Skip to main content

Class: FetchTimeoutError

Defined in: fetch/src/errors.ts:25

Error thrown when a fetch request times out via the alarm backstop.

Important: This error is ambiguous - the external API may have processed the request before the timeout. For non-idempotent operations, check the external system's state before retrying.

Example

@mesh
handleResult(result: ResponseSync | Error) {
if (result instanceof FetchTimeoutError) {
// Ambiguous - fetch may have succeeded
// Check external state before retrying non-idempotent operations
return;
}
if (result instanceof Error) {
// Definite failure - safe to retry
return;
}
// Success
}

Extends

  • Error

Constructors

Constructor

new FetchTimeoutError(message, url): FetchTimeoutError

Defined in: fetch/src/errors.ts:28

Parameters

message

string

url

string

Returns

FetchTimeoutError

Overrides

Error.constructor

Properties

name

name: string = 'FetchTimeoutError'

Defined in: fetch/src/errors.ts:26

Overrides

Error.name


url

readonly url: string

Defined in: fetch/src/errors.ts:28