Exception: Passfort::Errors::APIError

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

Overview

Represents any response from the API which is not a 200 OK

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, errors = [], response = nil) ⇒ APIError

Returns a new instance of APIError.



9
10
11
12
13
# File 'lib/passfort/errors/api_error.rb', line 9

def initialize(msg, errors = [], response = nil)
  super(msg)
  @response = response
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



7
8
9
# File 'lib/passfort/errors/api_error.rb', line 7

def errors
  @errors
end

#responseObject (readonly)

Returns the value of attribute response.



7
8
9
# File 'lib/passfort/errors/api_error.rb', line 7

def response
  @response
end