temporarily_unavailable
The request failed for a reason on this side, and the same call may succeed later without any change to it.
How to fix it
- Retry with exponential backoff and jitter. This code carries retryable: true by default.
- Record x-request-id from the response before retrying. For the catch-all case that id is the only handle on what actually went wrong, because the detail stays server-side.
- Stop retrying after a few attempts if the message names a configuration state, or if one call keeps failing while others work. Billing not configured and live send not enabled do not change between retries, and neither does an id in the path with the wrong prefix, such as an ibx_ id where a msg_ id belongs.
- If several unrelated calls fail at once, call the API's health check, GET /healthz, to see whether it is up. There is no status board yet.
Which rule fired
This is both a specific code and the catch-all. Any error that reaches the top-level handler without being an ApiError is logged and converted into this, with a 503 and the request id, because leaking an internal exception message to a caller is worse than a generic answer. One caller mistake meets the catch-all too: an id in the path with the wrong prefix or shape, which no retry can fix. It is also raised deliberately in several places where a dependency is missing rather than broken: rate-limiter bindings absent in production, an unconfigured database binding at the worker edge, billing or a plan's Stripe price not configured, live mail switched off. Those are configuration states, not outages, and they do not resolve by retrying.
| In error.message | Means |
|---|---|
The service is temporarily unavailable. | An unhandled error reached the top-level handler. The message is logged server-side and the response carries only the generic text and the request id. An id in the path has the wrong prefix or shape, such as an ibx_ id where a msg_ id belongs, and no access check refused it first. The id parser throws an ordinary error, which the top-level handler turns into this. Retrying cannot fix it. |
The MCP service is temporarily unavailable. | An unhandled error reached the MCP server's top-level handler. |
Request protection is temporarily unavailable. | Rate-limiter bindings are absent while APP_ENV is production or staging. Outside those environments the guard is skipped instead. A rate-limiter call itself threw. The request is refused rather than allowed through unmetered. |
A matching send is already in progress. | A send reuses the Idempotency-Key of a send that is still being committed, so there is no stored response to replay yet. |
A verification check is already running. Try again shortly. | A domain verification, or an inbox created on the domain, starts while another check on the same domain still holds its lease. |
DNS could not be checked. Existing records have not been assumed absent. Try again shortly. | A DNS lookup for the domain failed or timed out while previewing, attaching or verifying it, or creating an inbox on it. No record is assumed absent. |
DNS ownership could not be checked. Try again shortly. | The ownership TXT lookup failed or timed out while verifying a domain, or creating an inbox on it. |
DNS returned an invalid MX record. No domain changes were made. | The domain's MX records came back malformed. |
Database is not configured. | The database binding is not configured on the worker. |
Billing is not configured. | Billing is not configured on this deployment. |
The billing portal is not configured. | Opening the billing portal when it is not configured on this deployment. |
This plan's Stripe price is not configured. | Starting checkout for a plan whose Stripe price is not configured on this deployment. |
Configured price does not match the published offer. | Starting checkout when the Stripe price does not match the published plan: amount, currency, billing interval or mode. |
Live send is not enabled. | Sending from a live inbox while live send is switched off on this deployment. |
Live inbox provisioning is off until RESEND_ENABLED is set. | Creating a live inbox on the platform domain while live mail is switched off on this deployment, for a workspace with a paid subscription. |
Platform receive domain is not ready. | Creating a live inbox on the platform domain when the platform's receiving domain record is missing. |
Why it works this way: The rate limiter fails closed in production and open everywhere else. Allowing unmetered traffic through when the limiter is unavailable would remove the protection exactly when it is most likely to be needed, but applying the same rule locally would make development depend on infrastructure that has nothing to do with the code under test.
Example
{
"error": {
"code": "temporarily_unavailable",
"message": "The service is temporarily unavailable.",
"request_id": "req_8Kd2x91",
"retryable": true,
"details": {}
}
} The MCP server answers with this body when it refuses a call itself. Inside a tool call, send_message returns it as text in a result marked isError: true, without the code.
Where it appears
- Every /v1 route
-
POST /projects/{project_id}/ domains/ {domain_id}/ verify -
POST /projects/{project_id}/ inboxes -
POST https://mcp.emailforagents.ai/mcp
Paths are relative to https://api.emailforagents.ai/v1.