You always have to be mindful whether the server expects either a GET or a POST request, because using the incorrect request type will break things.
Also, you can catch Appwrite-specific errors by attaching .catch((e) => console.log(e)) to the promise
Hey, thanks for responding Mattias
But I'm still facing the issue
As you can see this is my code snippet
But still I'm getting the error
I'm using the web sdk of appwrite
Well im out of ideas. Maybe a CORS error?
but when the user exists it doesn't give error
Take a look at my React course capstone project at https://github.com/aabmets/react-capstone-course
which uses next.js + appwrite
Take a look at the pages/account.tsx file and understand how it works
also take a look at how the appwrite context is created
my implementation works
where are you using catch()?
getSession does throw error when the user isn't logged in and that's expected
that's how you know that user is not logged in
your app looks okay what's the issue? the network request error in red that you're getting in console won't break your app since you're catching it
yaa i got it now
but will it also be shown in production?
yes it will be
and that's how it's supposed to be
okay thanks
Recommended threads
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here π I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...