Skip to main content
All SDK errors extend ReyGridError, so instanceof checks work.
Other statuses (for example 500) throw the base ReyGridApiError.

Properties

Handling

Check subclasses before ReyGridApiError.

Reading error details

code and message come from the API’s error object, so you can branch on the error code directly:
Before 1.0.3, code and message were only read from the top level of the body, so most errors surfaced as HTTP 400 with no code. Upgrade to get the real values.

Retries

The SDK doesn’t retry. Retry ReyGridNetworkError and 5xx ReyGridApiError in your own code, with backoff. Don’t retry 4xx errors without fixing the request.