Exception: Boltless::Errors::TransactionRollbackError

Inherits:
RequestError
  • Object
show all
Defined in:
lib/boltless/errors/transaction_rollback_error.rb

Overview

This exception is raised when we failed to rollback a transaction at the neo4j server, or when another error caused a transaction rollback.

Instance Attribute Summary collapse

Attributes inherited from RequestError

#message, #response

Instance Method Summary collapse

Constructor Details

#initialize(message, errors: [], response: nil) ⇒ Errors::TransactionRollbackError

Create a new generic response error instance.

Parameters:

  • message (String)

    the error message

  • errors (Array<Errors::ResponseError>, Errors::ResponseError) (defaults to: [])

    a single/multiple response errors

  • response (HTTP::Response, nil) (defaults to: nil)

    the HTTP response, or nil when not available



19
20
21
22
23
# File 'lib/boltless/errors/transaction_rollback_error.rb', line 19

def initialize(message, errors: [], response: nil)
  @errors = Array(errors)
  message += "\n\n#{@errors.map { |err| "* #{err.message}" }.join("\n")}"
  super(message, response: response)
end

Instance Attribute Details

#errorsObject (readonly)

We allow to read our details



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

def errors
  @errors
end