Exception: Coffrify::ApiError

Inherits:
Error
  • Object
show all
Defined in:
lib/coffrify/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status:, message:, code: nil, details: nil) ⇒ ApiError

Returns a new instance of ApiError.



6
7
8
9
10
11
# File 'lib/coffrify/errors.rb', line 6

def initialize(status:, message:, code: nil, details: nil)
  super(message)
  @status = status
  @code = code
  @details = details
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/coffrify/errors.rb', line 5

def code
  @code
end

#detailsObject (readonly)

Returns the value of attribute details.



5
6
7
# File 'lib/coffrify/errors.rb', line 5

def details
  @details
end

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/coffrify/errors.rb', line 5

def status
  @status
end