Class: Octokit::Response::RaiseError

Inherits:
BaseMiddleware
  • Object
show all
Defined in:
lib/octokit/response/raise_error.rb

Overview

This class raises an Octokit-flavored exception based HTTP status codes returned by the API

Instance Method Summary collapse

Instance Method Details

#on_complete(response) ⇒ Object



12
13
14
15
16
# File 'lib/octokit/response/raise_error.rb', line 12

def on_complete(response)
  if error = Octokit::Error.from_response(response)
    raise error
  end
end