-
-
Notifications
You must be signed in to change notification settings - Fork 140
GraphQLError double wrapping returning result #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks you for reporting this, @Checho3388. The reason for the double-wrapping is that GraphQL-core wraps the ValueError into a GraphQLError in the method The problem is with the first wrapping. GraphQL-core simply tries to do too much here. I think the idea was to mimic the I will work on a fix and regression test for that. |
Glad to know it was fixed. Thanks for your quick response! |
@Cito was this ever released? I'm encountering the same issue :) |
@patrick91 Not yet, sorry. Will try to work on a new release this weekend. |
@Cito awesome, thanks for the prompt response, let me know if you need help :) |
Version 3.1.3 with this fix has now been released. |
I found out something confusing and wanted to know if maybe this could be a bug or if I'm missing something and this is an expected behavior.
This is my
example.py
file. It only has one resolver that raises an error.I'm aware that
result.errors[0]
is aGraphQLError
exception. But, I was expectingresult.errors[0].original_error
to beValueError
.However, I can see that
result.errors[0].original_error
is aGraphQLError
andresult.errors[0].original_error.original_error
isValueError
.Is this ok?
The text was updated successfully, but these errors were encountered: