Skip to content

SERVICE_UNAVAILABLE — Dependency unavailable

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.

503 Service Unavailable. Standard envelope. Usually includes Retry-After.

{
"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"
}
}
  • A dependency hit a transient outage.
  • A deploy or scaling event briefly interrupted traffic.
  • Network connectivity issue between regions.
  1. Respect Retry-After. Sleep that long, then retry once.
  2. Add exponential backoff if multiple retries are needed: 2s, 4s, 8s, capped at 30s.
  3. Use an idempotency key on writes so retries are safe.
  4. For sustained SERVICE_UNAVAILABLE (> 2 minutes), check the status page.