Core
isTimeoutCause
Whether cause is a timeout, across Core copies and platform timeout errors.
@defjs/core · Function
Signature
function isTimeoutCause(cause: unknown): boolean;
Returns true for an Error carrying the non-enumerable
Symbol.for('defjs.cause.timeout') brand, including ERR_TIMEOUT from
another Core copy, or a DOMException or Error named TimeoutError.
Other values return false.
Pass the underlying fault.cause; this function does not unwrap faults.
createNetworkFault uses this check to select NET_TIMEOUT. OpenTelemetry
keeps logging timeouts even when the abort signal is also set.
Parameters
Prop
Type
cause unknown