Skip to content
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

put json in exceptions as messages, so they can be parsed without #eval #66

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/auth0/mixins/httparty_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ module HTTPartyProxy
end
case result.code
when 200...226 then response_body
when 400 then fail Auth0::BadRequest, response_body
when 401 then fail Auth0::Unauthorized, response_body
when 403 then fail Auth0::AccessDenied, response_body
when 404 then fail Auth0::NotFound, response_body
when 500 then fail Auth0::ServerError, response_body
when 400 then fail Auth0::BadRequest, response_body.to_json
when 401 then fail Auth0::Unauthorized, response_body.to_json
when 403 then fail Auth0::AccessDenied, response_body.to_json
when 404 then fail Auth0::NotFound, response_body.to_json
when 500 then fail Auth0::ServerError, response_body.to_json
else
fail Auth0::Unsupported, response_body
fail Auth0::Unsupported, response_body.to_json
end
end
end
Expand Down