Exception: LedgerSync::Error::OperationError

Inherits:
LedgerSync::Error show all
Defined in:
lib/ledger_sync/error/operation_errors.rb

Defined Under Namespace

Classes: DuplicateLedgerResourceError, LedgerValidationError, NotFoundError, PerformedOperationError, ValidationError

Instance Attribute Summary collapse

Attributes inherited from LedgerSync::Error

#message

Instance Method Summary collapse

Constructor Details

#initialize(operation:, message: nil, response: nil) ⇒ OperationError

Returns a new instance of OperationError.



8
9
10
11
12
13
# File 'lib/ledger_sync/error/operation_errors.rb', line 8

def initialize(operation:, message: nil, response: nil)
  message ||= 'Operation failed.'
  @operation = operation
  @response = response
  super(message: message)
end

Instance Attribute Details

#operationObject (readonly)

Returns the value of attribute operation.



6
7
8
# File 'lib/ledger_sync/error/operation_errors.rb', line 6

def operation
  @operation
end

#responseObject (readonly)

Returns the value of attribute response.



6
7
8
# File 'lib/ledger_sync/error/operation_errors.rb', line 6

def response
  @response
end