Class: KafkaJSError

KafkaJS.KafkaJSError(error, properties)

KafkaJSError represents an error when using the promisified interface.

Constructor

new KafkaJSError(error, properties)

This constructor is meant to be used by the library. Please see the members for more information on what can be accessed from an error object.

Parameters:
Name Type Description
error Error | string

an Error or a string describing the error.

properties object

a set of optional error properties.

Properties
Name Type Attributes Default Description
retriable boolean <optional>
false

whether the error is retriable. Applies only to the transactional producer

fatal boolean <optional>
false

whether the error is fatal. Applies only to the transactional producer.

abortable boolean <optional>
false

whether the error is abortable. Applies only to the transactional producer.

stack string <optional>

the stack trace of the error.

code number <optional>
LibrdKafkaError.codes.ERR_UNKNOWN

the error code.

Members

abortable :boolean

Whether the error is abortable (for transactional producer).

Type:
  • boolean

code :number

The error code from Librdkafka.

This field should be checked (as opposed to the type of the error) to determine what sort of an error this is.

Type:
  • number
See:

fatal :boolean

Whether the error is fatal (for transactional producer).

Type:
  • boolean

message :string

Message detailing the error.

Type:
  • string

name :string

Name of the error.

Type:
  • string

retriable :boolean

Whether the error is retriable (for transactional producer).

Type:
  • boolean

stack

The stack trace of the error.