This class covers errors that occur during client-side portion of query execution, that is parts of the query plan executed by the driver. Because different such problems may arise, the errors of this class may have one of several error codes:

  • BAD_PROTOCOL_MESSAGE indicates invalid protocol message received by the client such as invalid part of a query plan or invalid or inconsistent data for partition sorting.
  • ILLEGAL_ARGUMENT indicates invalid or missing query parameters or operands, such as missing value for bound variable, non-numeric operand for arithmetic expression, non-numeric parameter for OFFSET or LIMIT clause, etc.
  • ILLEGAL_STATE indicates illegal state in the query engine, which may be caused by a problem in the engine. See the error message for details.
  • MEMORY_LIMIT_EXCEEDED indicates that local memory consumed by the query execution exceeded the limit set by maxMemoryMB. See MEMORY_LIMIT_EXCEEDED

Note that this class does not cover all errors that may occur during query execution. Besides error cases described above thrown by NoSQLQueryError, other errors that are common to execution of all APIs may also occur during execution of queries, such as network, service or authorization-related errors and also errors due to invalid arguments provided to the query API. These may be thrown as NoSQLError, NoSQLServiceError, NoSQLArgumentError, etc.

See

query

Hierarchy

Properties

cause?: Error

An error that caused this error. In many cases it is also instance of NoSQLError and may itself have a cause. You could iterate through the chain of causes like this:

for(let cause = err.cause; cause; cause = cause.cause) {...

If this error does not have a cause, the value of this property is undefined.

errorCode: ErrorCode

ErrorCode of this error.

message: string
name: string
operation?: Config | Operation

Operation that resulted in this error. Operation object contains the API and its arguments including the options used. Operation object may not always be available, in which case the value of this property is undefined.

If this error happened during creation of new NoSQLClient then instead of Operation this property contains Config used to create NoSQLClient instance.

See

retryable?: boolean

Indicates whether this error is retryable.

APIs that result in retryable errors are automatically retried by the driver's default RetryHandler. Default retry handler can be customized by properties in RetryConfig. Alternatively, a custom RetryHandler can be set as handler.

If necessary, APIs that result in retryable errors may also be explicitly retried by the application.

See

RetryConfig

stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: Object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc