ShopiError
All SDK errors are instances ofShopiError. Use instanceof to catch them cleanly.
Status codes
Automatic retries
The SDK automatically retries500, 502, 503, 504, and 429 responses up to 2 times with exponential backoff (300ms, then 600ms). You do not need to implement retry logic yourself.
For 429 responses, the SDK reads the Retry-After header and waits the correct amount of time before retrying.
Timeout
Every request times out after 10 seconds by default. A timed-out request throwsShopiError with status: 408.