class Escobar::GitHub::Response::RaiseError

Faraday response middleware to handle API errors This will translate status to Escobar::Client::Errors

Private Instance Methods

on_complete(response) click to toggle source
# File lib/escobar/github/response/raise_error.rb, line 9
def on_complete(response)
  case response.status
  when 401
    raise Escobar::Client::Error::Unauthorized
      .from_response_env(response, "GitHub Unauthorized")
  end
end