lib/auth0/mixins/httparty_proxy.rb in auth0-3.3.0 vs lib/auth0/mixins/httparty_proxy.rb in auth0-3.4.0

- old
+ new

@@ -11,14 +11,14 @@ result = self.class.send(method, safe_path, query: body) else result = self.class.send(method, safe_path, body: body.to_json) end response_body = - begin - JSON.parse(result.body.to_s) - rescue JSON::ParserError - result.body - end + begin + JSON.parse(result.body.to_s) + rescue JSON::ParserError + result.body + end case result.code when 200...226 then response_body when 400 then raise Auth0::BadRequest, response_body when 401 then raise Auth0::Unauthorized, response_body when 403 then raise Auth0::AccessDenied, response_body