Skip to main content
Version: v0.0.3

Class: MllpConnectionError

Thrown (or emitted via onError) for socket-layer problems such as connection refused, ECONNRESET, ETIMEDOUT, or DNS failure.

  • cause, the original OS or TLS error
  • phase, which connection lifecycle phase the failure occurred in
  • connectionCause, optional stable cause-code (e.g. for FIFO reconnect rejections)

Example

throw new MllpConnectionError('Connection refused', {
cause: osError,
phase: 'connect',
});

Extends

  • Error

Constructors

Constructor

new MllpConnectionError(message, opts): MllpConnectionError

Construct an MLLP connection error.

Parameters

message

string

Human-readable error message.

opts

Error context (underlying cause, the lifecycle phase, optional stable cause code).

cause

Error

connectionCause?

ConnectionErrorCause

phase

ConnectionErrorPhase

Returns

MllpConnectionError

Overrides

Error.constructor

Properties

cause

readonly cause: Error

The original OS or TLS error that caused this connection failure.

Overrides

Error.cause


connectionCause?

readonly optional connectionCause?: ConnectionErrorCause

Optional stable cause code. Present on FIFO reconnect rejections ('fifo-unsafe' for queued sends, 'in-flight-orphan' for in-flight sends).

The set of values is a public API; see ConnectionErrorCause.


name

readonly name: "MllpConnectionError"

Overrides

Error.name


phase

readonly phase: ConnectionErrorPhase

Which connection lifecycle phase the failure occurred in.