Skip to main content
zerotal

Documentation


Documentation / @zerotal/core / index / ServiceUnavailableError

Class: ServiceUnavailableError

Defined in: errors/HttpError.ts:103

503 Service Unavailable — the server is temporarily unable to handle the request.

Param

reason

Appended to the message for context (e.g. "database down").

Param

retryAfter

Seconds to wait before retrying; populates Retry-After.

Extends

Constructors

Constructor

new ServiceUnavailableError(reason?, retryAfter?): ServiceUnavailableError

Defined in: errors/HttpError.ts:105

Parameters

reason?

string

retryAfter?

number

Returns

ServiceUnavailableError

Overrides

HttpError.constructor

Properties

headers?

optional headers?: Record<string, string>

Defined in: errors/HttpError.ts:15

Inherited from

HttpError.headers


retryAfter?

readonly optional retryAfter?: number

Defined in: errors/HttpError.ts:104


code

readonly code: string

Defined in: errors/ZerotalError.ts:18

Inherited from

HttpError.code


status

readonly status: number = 500

Defined in: errors/ZerotalError.ts:19

Inherited from

HttpError.status


context?

readonly optional context?: Record<string, unknown>

Defined in: errors/ZerotalError.ts:20

Inherited from

HttpError.context