Class: DeserializationError

KafkaJS.DeserializationError(e, code)

EXPERIMENTAL: subject to change or removal.

DeserializationError is the common base of KafkaJS.KeyDeserializationError and KafkaJS.ValueDeserializationError, so that either can be recognised with a single check.

Neither is thrown to the application: they are reported on the message itself, as the error of deserializedKey or deserializedValue, so that the record is still delivered and the application can decide what to do with it. The error thrown by the deserializer is kept as KafkaJS.DeserializationError#cause.

Constructor

new DeserializationError(e, code)

This constructor is meant to be used by the library. Use KafkaJS.KeyDeserializationError or KafkaJS.ValueDeserializationError instead.

Parameters:
Name Type Description
e Error | string

the error thrown by the deserializer.

code number

the error code, set by the subclass.

Extends

Members

abortable :boolean

Whether the error is abortable (for transactional producer).

Type:
  • boolean
Overrides:

cause :Error|null

The error thrown by the deserializer, or null if it threw a non-Error.

Type:
  • Error | null

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
Overrides:
See:

fatal :boolean

Whether the error is fatal (for transactional producer).

Type:
  • boolean
Overrides:

message :string

Message detailing the error.

Type:
  • string
Overrides:

name :string

Name of the error.

Type:
  • string
Overrides:

retriable :boolean

Whether the error is retriable (for transactional producer).

Type:
  • boolean
Overrides:

stack

The stack trace of the error.

Overrides: