Exception: ApiError::Http

Inherits:
StandardError
  • Object
show all
Defined in:
lib/api_error/http.rb

Overview

Base http exception

Direct Known Subclasses

BadRequest, Forbidden, NotFound, Unauthorized

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code) ⇒ Http

Returns a new instance of Http.



8
9
10
11
# File 'lib/api_error/http.rb', line 8

def initialize(message, code)
  super(message)
  @code = code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



6
7
8
# File 'lib/api_error/http.rb', line 6

def code
  @code
end