Runs one backend call under a deadline whose expiry is a rejection.
The call receives an AbortSignal. When the deadline fires, the signal is
aborted with the caller's error and the returned promise rejects with that
same error — even if the call ignores the signal and never settles. The
call's own rejection (including a synchronous throw) is propagated
unchanged, never masked by the deadline. The timer is cleared on every path.
An out-of-range timeoutMs REJECTS with RangeError rather than throwing,
so a caller chaining .catch() sees it.
Runs one backend call under a deadline whose expiry is a rejection.
The call receives an
AbortSignal. When the deadline fires, the signal is aborted with the caller's error and the returned promise rejects with that same error — even if the call ignores the signal and never settles. The call's own rejection (including a synchronous throw) is propagated unchanged, never masked by the deadline. The timer is cleared on every path.An out-of-range
timeoutMsREJECTS withRangeErrorrather than throwing, so a caller chaining.catch()sees it.