Home Reference Source
import {Neo4jError} from 'neo4j-driver-core/lib/error.js'
public class | source

Neo4jError

Extends:

ErrorGQLError → Neo4jError

Class for all errors thrown/returned by the driver.

Static Method Summary

Static Public Methods
public static

isRetriable(error: object | undefined | null): boolean

Verifies if the given error is retriable.

Constructor Summary

Public Constructor
public

constructor(message: string, code: string, gqlStatus: string, gqlStatusDescription: string, diagnosticRecord: DiagnosticRecord, cause: Error)

Member Summary

Public Members
public

code: string

The Neo4j Error code

public

name: string

public

Inherited Summary

From class GQLError
public get
this get is experimental. this is part of the preview of GQL-compliant errors

The json string representation of the diagnostic record.

public

cause: Error?

Optional, nested error which caused the error

public
this member is experimental. this property is part of the preview of GQL-compliant errors

The GQL error classification, extracted from the diagnostic record

public

diagnosticRecord: DiagnosticRecord

this member is experimental. this property is part of the preview of GQL-compliant errors

The GQL diagnostic record

public

gqlStatus: string

this member is experimental. this property is part of the preview of GQL-compliant errors

The GQL Status code

public
this member is experimental. this property is part of the preview of GQL-compliant errors

The GQL Status Description

public

name: string

public
this member is experimental. this property is part of the preview of GQL-compliant errors

The GQL error classification, extracted from the diagnostic record as a raw string

Static Public Methods

public static isRetriable(error: object | undefined | null): boolean source

Verifies if the given error is retriable.

Params:

NameTypeAttributeDescription
error object | undefined | null

the error object

Return:

boolean

true if the error is retriable

Public Constructors

public constructor(message: string, code: string, gqlStatus: string, gqlStatusDescription: string, diagnosticRecord: DiagnosticRecord, cause: Error) source

Override:

GQLError#constructor

Params:

NameTypeAttributeDescription
message string

the error message

code string

Optional error code. Will be populated when error originates in the database.

gqlStatus string

the GQL status code of the error

gqlStatusDescription string

the GQL status description of the error

diagnosticRecord DiagnosticRecord

the error diagnostic record

cause Error

Optional nested error, the cause of the error

Public Members

public code: string source

The Neo4j Error code

public name: string source

Override:

GQLError#name

public retriable: * source