Every failed SDK call throws aDocumentation Index
Fetch the complete documentation index at: https://docs.quickshops.app/llms.txt
Use this file to discover all available pages before exploring further.
QuickshopsError. Because the SDK wraps all network communication, you get a consistent error shape regardless of whether the failure is an authentication problem, a rate limit, or a missing resource. Catching errors by type lets you respond precisely without parsing raw HTTP responses.
The QuickshopsError class
QuickshopsError extends the native Error class and adds four fields:
| Field | Type | Description |
|---|---|---|
message | string | Human-readable description of the error |
status | number | HTTP status code returned by the API |
code | string | Machine-readable error code string |
requestId | string | undefined | Unique request identifier, when available |
Catching errors
ImportQuickshopsError alongside the default export and use instanceof to distinguish SDK errors from other thrown values.
Common error codes
| Status | Code | Cause |
|---|---|---|
401 | UNAUTHORIZED | Your API key is missing, malformed, or has been revoked |
429 | RATE_LIMIT_EXCEEDED | Your requests have exceeded the allowed rate; back off and retry |
404 | NOT_FOUND | The requested resource (product, cart, etc.) does not exist |
400 | INVALID_API_KEY | The API key passed to the constructor does not start with qk_ |
Handling errors by status
You can branch onerr.status to respond differently to each condition.