I have a database & collection pair set up with the database ID "Data" and the collection ID "Collection". They are set up with All users granted all access rights to the collection.
Database and collection are created & configured by a backend application (via the .net API). This application is able to create new documents in the collection just fine. However when the Angular-based client attempts to do so, it is met with the exception "AppwriteException: Database not found". This same client can see the documents created by the backend just fine, via a realtime subscription.
The frontend is registered on the (cloud.appwrite.io) dashboard as a web client with hostname set to "localhost" as I am just testing & developing locally for now.
The typescript attempting to create the document in the client is as follows:
async sendMessage (message: string)
{
this.error = null;
try
{
await databases.createDocument (
'Data',
'Collection',
ID.unique (),
{
sender: this.username,
contents: message
}
);
}
catch (error)
{
this.error = error;
}
}
Any idea what could be causing the error? Common pitfalls I should look out for?
Recommended threads
- Frequent 500 Internal Server Errors - Pr...
PROJECT ID: 6951f2xxxxx1ee9e750a REGION: Singapore (sgp.cloud.appwrite.io) PLAN: Pro Our production application experiences **500 Internal Server Errors** mult...
- Issue with Custom SMTP
Hey everyone, I'm facing an issue when updating my Custom SMTP settings on Appwrite Cloud. The UI fails silently (no visual errors), but when checking the cons...
- Problem with Google Workspace at DNS Rec...
Hello, I bought a domain at Namecheap, and Google Workspace used to work there, but now that I switched from Custom DNS to Appwrite's nameservers, it doesn't w...