<@U0RQY0KK5> I'm not sure about the errors When i'...
# prisma-whats-new
p
@nilan I'm not sure about the errors When i'm creating user i'm getting error like this error Error: GraphQL error: No user found with that information at new ApolloError (ApolloError.js:31) at eval (QueryManager.js:104) at <anonymous>
✅ 1
n
@ppatidar Hey, what does the mutation look like?
p
mutation { createUser(authProvider: {email: {email: "athlete@miniche.com", password: "12345678"}}, firstName: "athlete", lastName: "athlete", role: ATHLETE, athlete: {}) { id } }
in Apollo i'm getting this type error
n
You have the
firstName
and
lastName
fields defined in the schema yeah?
p
Yes
n
Odd.
You shouldn’t be getting that message.
What if you remove the
athelete
and
role
mutation?
p
Yes I'm not Sure
Everything working fine i'm just given alreday used email at the time of signup then getting like erorrr should be proper error not exeption
n
the error message is typically returned for
signInUser
mutations, not for
createUser
- do you call that mutation somewhere?
p
No
Sorry you are right I'm calling SignInUser
How can i handle this type of error
?
n
this kind of error means you are not entering the correct email/password information
p
Yes but how can i handle errors its come like exceptions everytime i need to exceptions handling
a
I have this exact same error.
n
@ppatidar what client are you using?
p
Apollo + react
n
ok, you need to catch the error from the promise of the mutation, then you can inspect its error code
p
Ok 🙂