Exception: Legion::Extensions::Lakera::Helpers::Errors::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/legion/extensions/lakera/helpers/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status: nil, error_type: nil, body: nil) ⇒ ApiError

Returns a new instance of ApiError.



11
12
13
14
15
16
# File 'lib/legion/extensions/lakera/helpers/errors.rb', line 11

def initialize(message = nil, status: nil, error_type: nil, body: nil)
  super(message)
  @status     = status
  @error_type = error_type
  @body       = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



9
10
11
# File 'lib/legion/extensions/lakera/helpers/errors.rb', line 9

def body
  @body
end

#error_typeObject (readonly)

Returns the value of attribute error_type.



9
10
11
# File 'lib/legion/extensions/lakera/helpers/errors.rb', line 9

def error_type
  @error_type
end

#statusObject (readonly)

Returns the value of attribute status.



9
10
11
# File 'lib/legion/extensions/lakera/helpers/errors.rb', line 9

def status
  @status
end