resp = JSON.parse(response.body)
                raise Unauthorized, {:status => response.code, :method => method, :response_headers => response.headers, :url => endpoint + path, :body => resp['status']}