Rank 3: Container
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.
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 3: Container
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.
Rank 3: Container
Also, you can catch Appwrite-specific errors by attaching .catch((e) => console.log(e)) to the promise
@everyone
Hey, thanks for responding Mattias
@everyone
But I'm still facing the issue
@everyone
As you can see this is my code snippet
@everyone
@everyone
But still I'm getting the error
@everyone
@everyone
I'm using the web sdk of appwrite
Rank 3: Container
Well im out of ideas. Maybe a CORS error?
@everyone
but when the user exists it doesn't give error
Rank 3: Container
Take a look at my React course capstone project at https://github.com/aabmets/react-capstone-course
Rank 3: Container
which uses next.js + appwrite
Rank 3: Container
Take a look at the pages/account.tsx file and understand how it works
Rank 3: Container
also take a look at how the appwrite context is created
Rank 3: Container
my implementation works
Rank 2: Process
where are you using catch()?
Rank 2: Process
getSession does throw error when the user isn't logged in and that's expected
Rank 2: Process
that's how you know that user is not logged in
Rank 2: Process
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
@everyone
yaa i got it now
@everyone
but will it also be shown in production?
Rank 2: Process
yes it will be
Rank 2: Process
and that's how it's supposed to be
@everyone
okay thanks