How can I return an error thrown in a plugin in the client response, as if it's a graphql error? #7594
Unanswered
sanket143-toddleapp
asked this question in
Q&A
Replies: 1 comment
-
Throwing from a plugin shouldn't cause the server to exit at all. Can you share your plugin code (or better yet, a full and minimal reproduction that I can run)? We have a lot of information about handling errors, throwing from plugins, and formatting for client consumption on the Error Handling docs page. You'll probably find what you're looking for there, but if not I can help further once I see your code. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am creating a plugin for authorization but I'm also supposed to throw error which gets resolved to the client, but whenever I throw an error, it's not going in the response, rather the server exists with code 1.
How can I return the error in the response?
Beta Was this translation helpful? Give feedback.
All reactions