\n\n
\n

subscribe

\n
\n \n \n
\n \n
\n```\n\ni simply follow the guide on the website, but it seems to not communicate with my database_id and collection id","author":{"@type":"Person","name":"JackBiscuits"},"datePublished":"2024-03-25T19:30:16.104Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/LikeAction","userInteractionCount":0},"commentCount":7,"comment":[{"@type":"Comment","text":"Where are you initializing the appwrite client?","author":{"@type":"Person","name":"Kenny"},"datePublished":"2024-03-25T19:34:06.363Z","url":"https://appwrite.io/threads/1221904002623471767#message-1221904968399982743"},{"@type":"Comment","text":"I am initializing it at src/lib/appwrite.js:\n\n``` import { Client, Databases, Account } from \"appwrite\";\n\nconst client = new Client();\nclient\n .setEndpoint(\"https://cloud.appwrite.io/v1\")\n .setProject(\"project id\"); // Replace with your project ID\n\nexport const account = new Account(client);\nexport const databases = new Databases(client); ```","author":{"@type":"Person","name":"JackBiscuits"},"datePublished":"2024-03-25T19:44:31.030Z","url":"https://appwrite.io/threads/1221904002623471767#message-1221907588443148450"},{"@type":"Comment","text":"Are you having any errors thrown?","author":{"@type":"Person","name":"Kenny"},"datePublished":"2024-03-25T19:45:22.867Z","url":"https://appwrite.io/threads/1221904002623471767#message-1221907805863280703"},{"@type":"Comment","text":"before running it does say\n \"Parameter 'Email' implicitly has an 'any' type.\" in vs code.\n\nI also get the self-made error:\n\n\"\"Something went wrong while submitting your request. Please try again later.\"\"","author":{"@type":"Person","name":"JackBiscuits"},"datePublished":"2024-03-25T19:46:04.518Z","url":"https://appwrite.io/threads/1221904002623471767#message-1221907980560236626"},{"@type":"Comment","text":"How can i do error handling? how can see wht goes wrong in appwrite?","author":{"@type":"Person","name":"JackBiscuits"},"datePublished":"2024-03-25T19:56:46.279Z","url":"https://appwrite.io/threads/1221904002623471767#message-1221910672301101116"},{"@type":"Comment","text":"You can wrap your appwrite code in a try catch block.","author":{"@type":"Person","name":"Kenny"},"datePublished":"2024-03-25T19:57:54.384Z","url":"https://appwrite.io/threads/1221904002623471767#message-1221910957954043995"},{"@type":"Comment","text":"Could you in addIdea do something like\n\n```js\nexport async function addIdea(Email, CIty) {\n console.log(DATABASE_ID);\n console.log(COLLECTION_ID);\n\n try {\n await databases.createDocument(DATABASE_ID, COLLECTION_ID, ID.unique(), {\n Email,\n CIty\n }\n );\n } catch (error: any) {\n console.log(error);\n }\n}\n```","author":{"@type":"Person","name":"Kenny"},"datePublished":"2024-03-25T19:59:47.716Z","url":"https://appwrite.io/threads/1221904002623471767#message-1221911433302769684"}]}}
Skip to content
Back
DatabasesWeb

Sveltekit + simple Appwrite database

Votes

0

Replies

7

Participants

Unknown

Messages

8

JackBiscuitsOriginal post

Rank 1: Thread

Kenny
JackBiscuits

Rank 1: Thread

Kenny
JackBiscuits

Rank 1: Thread

JackBiscuits

Rank 1: Thread

Kenny
Kenny

Join the discussion

Reply to this thread by joining our Discord.

Reply on Discord