-
Notifications
You must be signed in to change notification settings - Fork 982
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
Raise exception on nil status #1042
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,8 @@ def on_complete(env) | |
raise Faraday::ConflictError, response_values(env) | ||
when 422 | ||
raise Faraday::UnprocessableEntityError, response_values(env) | ||
when nil | ||
raise Faraday::NilStatusError, response_values(env) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you make the suggestions I made above, you'll need to change this line as well There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good 👍 I'll get to this later today There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So passing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤦♂ silly me, we're not using Faraday::NilStatusError.new so the backtrace is implicit |
||
when ClientErrorStatuses | ||
raise Faraday::ClientError, response_values(env) | ||
when ServerErrorStatuses | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I submitted a PR to your fork, this will need two params to handle the stack trace that's sent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw that, just lifted what you had and popped it in here, easier than merging things into the fork