Skip to main content

Interface: GSwapStatusErrorOptions

gSwap SDK 2.0.0-rc.4


gSwap SDK 2.0.0-rc.4 / GSwapStatusErrorOptions

Interface: GSwapStatusErrorOptions

Defined in: packages/gswap-sdk/dist/index.d.ts:912

What GSwapSDKError.fromStatus may be told about the HTTP answer.

Properties​

body?​

optional body?: unknown

Defined in: packages/gswap-sdk/dist/index.d.ts:922

The response body, kept as error.body (or bodyText for a string).


retryAfterMs?​

optional retryAfterMs?: number

Defined in: packages/gswap-sdk/dist/index.d.ts:924

How long the server asked to wait (Retry-After), in milliseconds.


serverMessage?​

optional serverMessage?: string

Defined in: packages/gswap-sdk/dist/index.d.ts:920

The server's own text, for HTTP_ERROR.params.serverMessage ('' when none).


uniqueKey?​

optional uniqueKey?: string

Defined in: packages/gswap-sdk/dist/index.d.ts:916

The signed uniqueKey of the WRITE the answer is for; its presence makes this a write.


url?​

optional url?: string

Defined in: packages/gswap-sdk/dist/index.d.ts:914

The URL the request went to.


write?​

optional write?: boolean

Defined in: packages/gswap-sdk/dist/index.d.ts:918

Say it outright: true for a write (needs uniqueKey), false for a read.