Exception: Fortnox::Error

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

Direct Known Subclasses

BadRequest, Forbidden, InternalServerError, NotFound

Defined Under Namespace

Classes: BadRequest, Forbidden, InternalServerError, NotFound

Class Method Summary collapse

Class Method Details

.from_response(response) ⇒ Object



10
11
12
# File 'lib/fortnox/error.rb', line 10

def from_response(response)
  error_class(response.code).new(error_message(response.parsed_response))
end