Exception: Easyship::Errors::EasyshipError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/easyship/errors/easyship_error.rb

Overview

Represents an error that is raised when an error occurs in the Easyship API.

Direct Known Subclasses

ClientError, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message: '', body_error: {}) ⇒ EasyshipError

Returns a new instance of EasyshipError.



9
10
11
12
13
# File 'lib/easyship/errors/easyship_error.rb', line 9

def initialize(message: '', body_error: {})
  super(message)
  @message = message
  @body_error = body_error
end

Instance Attribute Details

#body_errorObject (readonly)

Returns the value of attribute body_error.



7
8
9
# File 'lib/easyship/errors/easyship_error.rb', line 7

def body_error
  @body_error
end

#messageObject (readonly)

Returns the value of attribute message.



7
8
9
# File 'lib/easyship/errors/easyship_error.rb', line 7

def message
  @message
end