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
readonlyelapsedMs:number
Milliseconds elapsed between write-flush and timeout fire.
messageControlId
readonlymessageControlId:string|undefined
MSH-10 control ID of the timed-out send (FIFO mode: undefined).
name
readonlyname:"MllpTimeoutError"
Overrides
Error.name
sentAt
readonlysentAt:number
Epoch ms timestamp recorded at write-flush callback.