Przejdź do głównej zawartości

Class: StorefrontError

Extends​

  • Error

Constructors​

Constructor​

new StorefrontError(options): StorefrontError

Parameters​

options​

StorefrontErrorOptions

Returns​

StorefrontError

Overrides​

Error.constructor

Properties​

code​

readonly code: string


graphqlErrors​

readonly graphqlErrors: GraphQLErrorInfo[]


retryAfterMs?​

readonly optional retryAfterMs?: number

Server-requested wait before retrying, in milliseconds (from Retry-After). undefined when the server sent no parsable value.


status​

readonly status: number


userErrors​

readonly userErrors: UserError[]

Accessors​

hasUserErrors​

Get Signature​

get hasUserErrors(): boolean

True if this error contains user errors (field-level validation)

Returns​

boolean


isAborted​

Get Signature​

get isAborted(): boolean

True if the caller cancelled the request via its AbortSignal

Returns​

boolean


isNetworkError​

Get Signature​

get isNetworkError(): boolean

True if this is a network error (no HTTP response)

Returns​

boolean


isNonJsonResponse​

Get Signature​

get isNonJsonResponse(): boolean

True if the response body could not be parsed as JSON — a proxy, WAF challenge, or edge block page substituted for the actual API response. See NonJsonResponseDiagnostics for the shape carried in cause.

Returns​

boolean


isRateLimited​

Get Signature​

get isRateLimited(): boolean

True if the server rejected the request because too many were made in a short window (HTTP 429). This is transient — the request can succeed once the limit window passes; it does NOT mean the session is gone.

Returns​

boolean


isTimeout​

Get Signature​

get isTimeout(): boolean

True if the request timed out

Returns​

boolean