-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
rescue_from
Does Not Work With Execution::Interpreter
and/or Analysis::AST
#3198
Comments
Hey, sorry for the trouble. Did you try the new errors plugin? https://graphql-ruby.org/errors/error_handling.html It has a lot better error handling with the interpreter. If you hook that up and still run into trouble, please share the new backtrace. Sorry about all the crazy plugins, for better or for worse, they'll be the default behavior in 1.12.0 🍻 |
Hi, when I add
|
Looking back now I see it's because the above |
Describe the bug
Just upgraded from 1.8.10 to 1.11.5. Was using GraphQL Guard and came across this issue. Further investigation showed that in general
rescue_from
was no longer working.In the below example I expect
ActiveRecord::RecordNotFound
to be rescued and"ERROR!"
printed but, it's not, it's just propagated. Never touched byRescueMiddleware
.When:
are commented out it works as expected.
The reason I'm using these 2 is because they're required by GraphQL Guard. When not included it raises an error. Certainly the underlying issue could be there. Not sure hence this issue.
Versions
graphql
version: 1.11.5rails
(or other framework): 5.2.3graphql-batch
: 0.4.3GraphQL schema
Steps to reproduce
Raise an
ActiveRecord::RecordNotFound
error from a fieldExpected behavior
rescue_from
is invokedActual behavior
rescue_from
is not invokedPlace full backtrace here (if a Ruby exception is involved):
Click to view exception backtrace
The text was updated successfully, but these errors were encountered: