CloudPrint API errors and retries
Handle CloudPrint API status codes, machine-readable errors, rate limits, request tracing and safe retry decisions.
Stable error shape
Error responses use error, optional error_code, a safe message and optional structured details. Branch on machine-readable fields and HTTP status, never on localized message text.
Request tracing
Every API response includes X-Request-Id. Log it next to your business identifier, print_job_id and timestamp so the same request can be found during support.
Retry decisions
Retry 429 after Retry-After and transient 5xx failures with bounded exponential backoff. Refresh a token once after 401. Fix scopes after 403, payloads after 400 or 422, and formats after 415. Never blindly retry a print create without the original Idempotency-Key.
Operational failures
An accepted API request can still produce a print job with status failed. Read failure_reason and compare document format and requested options with the selected printer capabilities.