Has anyone played around with how to return errors...
# orm-help
s
Has anyone played around with how to return errors with graphql-yoga lambda? I've been trying to throw auth errors in
context
but they return as 500 errors with serverless.
d
throw new Error('Error text here')
s
Thanks, I was trying that, but when I throw a new Unauthorized error in the context, I can see the error reported to the console but then the serverless returns a 500 error that has a body of
Invalid options provided to ApolloServer: Unauthorized
https://github.com/CaptainChemist/serverlessDeals/blob/master/handler.js
n
this might help: https://dev.to/andre/handling-errors-in-graphql--2ea3 maybe your question is also more specific to
graphql-yoga
, then posting it here might be better:https://github.com/graphcool/graphql-yoga 🙂
s
Thanks Nilan! I wasn't sure whether Prisma is a product of Graph.cool or whether you guys have rebranded your company as Prisma. Is there a different slack chat that is better for broader discussions? (Sorry this is probably a really basic question.)
n
we rebranded to Prisma today and Graphcool is a different product of ours, also see #announcements
this Slack is great for broad discussions, maybe #graphql-yoga
s
Got it, thanks! Congrats, you guys are great!
n
thanks so much 😊 great to have you here