Exception: Gitwrap::Exception::APIError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/gitwrap/error.rb

Direct Known Subclasses

Clienterror, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAPIError

Returns a new instance of APIError.



6
7
8
9
# File 'lib/gitwrap/error.rb', line 6

def initialize
  message = "[HTTP #{http_status}] #{response_body}"
  super (message)
end

Instance Attribute Details

#http_statusObject

Returns the value of attribute http_status.



4
5
6
# File 'lib/gitwrap/error.rb', line 4

def http_status
  @http_status
end

#response_bodyObject

Returns the value of attribute response_body.



4
5
6
# File 'lib/gitwrap/error.rb', line 4

def response_body
  @response_body
end