Skip to main content

Error Handling

The PolarGrid SDKs provide typed errors for robust error handling.

Error Types

Basic Error Handling

Retry Logic

The SDKs include automatic retry with exponential backoff for transient errors. Configure with:

Custom Retry

For more control:

Rate Limiting

When rate limited, the RateLimitError includes a retryAfter property (populated when the server sends a Retry-After header; otherwise undefined, so fall back to a fixed delay as shown below). PolarGrid allows 100 requests per minute per user, counted independently on each edge node. See the Rate Limits guide for full details, retry strategies, and production best practices.

Request IDs

Every request includes a unique ID for debugging. Include it when contacting support:

Validation Errors

Validation errors include details about what’s wrong:

Debug Mode

Enable debug logging to see request/response details: