-
Notifications
You must be signed in to change notification settings - Fork 365
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
Get NoMethodError
when there is an example that expect an api to raise 500 error
#473
Comments
+1 |
seems like we just need buy-in to write a PR to fix it (and how it should fix it) |
@bf4 In general I'm of the opinion that your API endpoints shouldn't knowingly raise, and you should have a catch all for situations you didn't predict, but maybe there's a reason to do this? |
In our case I had an acceptance test that asserted the action wasn't routed example "PATCH update" do
expect {
do_request
}.to raise_error(ActionController::RoutingError, /No route matches/)
end which I think is reasonable, though I should probably just tag it as |
@bf4 does your app not rescue this error and provide a response to the client? |
The example that will cause the problem:
Backtraces
The text was updated successfully, but these errors were encountered: