M Zeeshan
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in practice, it is actually an object, as evidenced by the following logged output:
TypeScript
{
name: 'AppwriteException',
code: 404,
type: 'document_not_found',
response: {
message: 'Document with the requested ID could not be found.',
code: 404,
type: 'document_not_found',
version: '1.6.1',
},
}
This mismatch between the type definition and the actual runtime behavior can lead to type-related issues in TypeScript projects.
TL;DR
Issue: TypeScript type definitions for AppwriteException have a discrepancy with the actual runtime behavior. The response property is defined as a string but is actually an object.
Solution: Update the TypeScript type definitions for AppwriteException to correctly reflect that the response property is an object, not a string. Recommended threads
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...
- Appwrite exception: user_unauthorized, t...
After refreshing the app it is working perfectly
- Update Operation Blocked Due to userAgen...
I created an attribute named userAgent in the leads collection, but now an error is being displayed. When I try to update a document, it doesn't let me successf...