Documentation / @zerotal/client / index / ApiClientError
Class: ApiClientError
Defined in: client/src/errors.ts:9
Thrown for any non-2xx HTTP response.
body is the raw response text. For 422 validation failures the more specific
ValidationError subclass is thrown instead, exposing the parsed field errors.
Extends
Extended by
Constructors
Constructor
new ApiClientError(
status,statusText,body,headers?):ApiClientError
Defined in: client/src/errors.ts:13
Parameters
status
number
statusText
string
body
string
headers?
Headers
Returns
ApiClientError
Overrides
Properties
headers
readonlyheaders:Headers|undefined
Defined in: client/src/errors.ts:11
Response headers, when available (used for Retry-After, rate-limit info, etc.).
statusText
readonlystatusText:string
Defined in: client/src/errors.ts:15
body
readonlybody:string
Defined in: client/src/errors.ts:16
code
readonlycode:string
Defined in: core/src/errors/ZerotalError.ts:18
Inherited from
status
readonlystatus:number=500
Defined in: core/src/errors/ZerotalError.ts:19
Inherited from
context?
readonlyoptionalcontext?:Record<string,unknown>
Defined in: core/src/errors/ZerotalError.ts:20
Inherited from
Accessors
retryAfterMs
Get Signature
get retryAfterMs():
number|null
Defined in: client/src/errors.ts:28
Parsed Retry-After (seconds or HTTP-date) in milliseconds, or null when absent.
Returns
number | null