Class ArangoError

Represents an error returned by ArangoDB.

Hierarchy

  • Error
    • ArangoError

Constructors

  • Creates a new ArangoError from an ArangoDB error response.

    Parameters

    • data: Omit<ArangoErrorResponse, "error">
    • options: {
          cause?: Error;
          isSafeToRetry?: null | boolean;
      } = {}
      • Optional cause?: Error
      • Optional isSafeToRetry?: null | boolean

    Returns ArangoError

Properties

code?: number

HTTP status code included in the server error response object.

errorNum: number

ArangoDB error code.

See ArangoDB error documentation.

name: string = "ArangoError"
prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

Type declaration

    • (err, stackTraces): any
    • Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

stackTraceLimit: number

Accessors

  • get errorMessage(): string
  • Error message accompanying the error code.

    Returns string

  • get request(): undefined | Request
  • Fetch request object.

    Returns undefined | Request

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void