*reducto.Error type for API errors.
Error Handling
All SDK methods return errors following Go conventions:API Error Type
When the API returns a non-success status code, the SDK returns a*reducto.Error:
*reducto.Error type contains:
StatusCode: HTTP status code*http.Request: The request that failed*http.Response: The response receivedDumpRequest(): Serialize the HTTP request for debuggingDumpResponse(): Serialize the HTTP response for debugging
Error Status Codes
Common status codes:400: Bad Request - Invalid parameters401: Authentication Error - Invalid or missing API key403: Permission Denied - Insufficient permissions404: Not Found - Resource doesn’t exist422: Unprocessable Entity - Validation error429: Rate Limit - Too many requests500+: Internal Server Error - Server-side issue
Automatic Retries
The SDK automatically retries requests on:- Connection errors
- 408 Request Timeout
- 409 Conflict
- 429 Rate Limit
- 5xx Internal Server Errors
option.WithMaxRetries:
Manual Retry Logic
For custom retry logic:Timeouts
Use context for request timeouts:Next Steps
- Learn about job management for async operations
- Explore examples with error handling patterns