SERVICE_UNAVAILABLE — Dependency unavailable
Summary
Section titled “Summary”A backing service the request needs is unavailable. Common dependencies that can fail this way: the primary database, Redis (queue + idempotency cache), or the SPSS microservice.
HTTP status
Section titled “HTTP status”503 Service Unavailable. Standard envelope. Usually includes Retry-After.
Example response
Section titled “Example response”{ "success": false, "error": { "code": "SERVICE_UNAVAILABLE", "message": "A required service is temporarily unavailable. Retry after 30 seconds.", "request_id": "req_01HXJZK4ABCDEF", "doc_url": "https://docs.surveycoder.io/errors/service-unavailable" }}Why this happens
Section titled “Why this happens”- A dependency hit a transient outage.
- A deploy or scaling event briefly interrupted traffic.
- Network connectivity issue between regions.
How to fix it
Section titled “How to fix it”- Respect
Retry-After. Sleep that long, then retry once. - Add exponential backoff if multiple retries are needed: 2s, 4s, 8s, capped at 30s.
- Use an idempotency key on writes so retries are safe.
- For sustained
SERVICE_UNAVAILABLE(> 2 minutes), check the status page.
Related
Section titled “Related”QUEUE_UNAVAILABLE— specific to Redis/BullMQSPSS_SERVICE_ERROR— specific to SPSS exportsDB_ERROR