Exception: Lutaml::Hal::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/lutaml/hal/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, response: nil) ⇒ Error

Returns a new instance of Error.



10
11
12
13
# File 'lib/lutaml/hal/errors.rb', line 10

def initialize(message = nil, response: nil)
  message.nil? ? super() : super(message)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

HTTP context for errors mapped from a response status, as { status: Integer, headers: Hash }. Nil for locally raised errors.



8
9
10
# File 'lib/lutaml/hal/errors.rb', line 8

def response
  @response
end