Exception: SendLayer::SendLayerAPIError

Inherits:
SendLayerError show all
Defined in:
lib/sendlayer/exceptions.rb

Overview

Raised for API errors not covered by a more specific type.

Instance Attribute Summary

Attributes inherited from SendLayerError

#errors, #response, #status_code

Instance Method Summary collapse

Methods inherited from SendLayerError

#codes

Constructor Details

#initialize(message, status_code = nil, response = nil, errors = nil) ⇒ SendLayerAPIError

Returns a new instance of SendLayerAPIError.



33
34
35
36
# File 'lib/sendlayer/exceptions.rb', line 33

def initialize(message, status_code = nil, response = nil, errors = nil)
  # Historical string form keeps the status prefix.
  super("API Error #{status_code}: #{message}", status_code, response, errors)
end