Exception: Cpro::ApiError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ApiError.



11
12
13
14
15
16
# File 'lib/cpro/errors.rb', line 11

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

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



9
10
11
# File 'lib/cpro/errors.rb', line 9

def body
  @body
end

#correlation_idObject (readonly)

Returns the value of attribute correlation_id.



9
10
11
# File 'lib/cpro/errors.rb', line 9

def correlation_id
  @correlation_id
end

#statusObject (readonly)

Returns the value of attribute status.



9
10
11
# File 'lib/cpro/errors.rb', line 9

def status
  @status
end