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 HTTP metadata:
Import
QuickshopsError from @quickshops/sdk/models/errors. Import the client from @quickshops/sdk in server-only modules.
Catching errors
Useinstanceof to distinguish SDK errors from other thrown values.
Common error codes
Parseerr.body as JSON when you need machine-readable codes:
Handling errors by status
You can branch onerr.statusCode to respond differently to each condition.