Skip to main content
Version: v0.0.3

Class: MllpTimeoutError

Thrown (or rejects the send() promise) when an ACK does not arrive within the configured ackTimeoutMs.

The timeout clock starts at the underlying write() flush callback, NOT at the send() call, pre-flush queue time is not charged to the peer.

Example

try {
await client.send(payload);
} catch (err) {
if (err instanceof MllpTimeoutError) {
logger.warn({ elapsedMs: err.elapsedMs, controlId: err.messageControlId });
}
}

Extends

  • Error

Constructors

Constructor

new MllpTimeoutError(message, opts): MllpTimeoutError

Construct an MLLP timeout error.

Parameters

message

string

Human-readable error message.

opts

Timeout context (originating message control id, elapsed time, flush timestamp).

elapsedMs

number

messageControlId

string | undefined

sentAt

number

Returns

MllpTimeoutError

Overrides

Error.constructor

Properties

elapsedMs

readonly elapsedMs: number

Milliseconds elapsed between write-flush and timeout fire.


messageControlId

readonly messageControlId: string | undefined

MSH-10 control ID of the timed-out send (FIFO mode: undefined).


name

readonly name: "MllpTimeoutError"

Overrides

Error.name


sentAt

readonly sentAt: number

Epoch ms timestamp recorded at write-flush callback.