Exception: Elmas::BadRequestException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/elmas/exception.rb

Instance Method Summary collapse

Constructor Details

#initialize(response, parsed) ⇒ BadRequestException

Returns a new instance of BadRequestException.



5
6
7
8
9
# File 'lib/elmas/exception.rb', line 5

def initialize(response, parsed)
  @response = response
  @parsed = parsed
  super(message)
end

Instance Method Details

#messageObject



11
12
13
# File 'lib/elmas/exception.rb', line 11

def message
  "code #{@response.status}: #{@parsed.error_message}"
end