Exception: Amsi::Error::BadRequest

Inherits:
Base
  • Object
show all
Defined in:
lib/amsi/error/bad_request.rb

Overview

Raised when an AMSI request has an error node in the contents. This generally happens when one of the parameters in a section other than the auth section is invalid.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ BadRequest

Returns a new instance of BadRequest.

Parameters:

  • errors (Object)

    object must respond to message



12
13
14
15
# File 'lib/amsi/error/bad_request.rb', line 12

def initialize(errors)
  super(errors.map(&:message).join('; '))
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



9
10
11
# File 'lib/amsi/error/bad_request.rb', line 9

def errors
  @errors
end