Skip to content

Errors and helpers

SDK Reference

Errors and helpers

Exceptions, response wrappers and utility classes for each SDK.

class

ApiError

Normalized HTTP, validation, rate-limit and network error.

new ApiError(message, options)
class

ProxyRequestError

Base SDK error.

class

PaginationError

Pagination contract error.

class

InvalidSignatureError

Webhook signature verification error.

types

Client options and response types

Public ClientOptions, ClientCommonOptions, RawRequestOptions, RequestControls and ApiResponse types.

ClientOptionsRequestControlsApiResponse<Data>
function

paginate

Iterates all pages returned by a paginated resource method.

paginate(fetchPage, options?): AsyncGenerator<Item>
class

WebhookVerifier

Verifies signed ProxyRequest webhook payloads.

WebhookVerifier.verify(rawBody, signature, secret)WebhookVerifier.verifyOrThrow(rawBody, signature, secret)
class

FileDownload

Binary download with filename and content type metadata.

arrayBuffer()blob()text()