Endpoints can become unavailable due to consecutive failures or manual disable. Unavailable endpoints return 503 — never 402.
Error response
{
"error": "endpoint_unavailable",
"message": "This endpoint is temporarily unavailable."
}
No payment is attempted or required when an endpoint is unavailable.
Health tracking
The platform tracks consecutive refundable execution failures per endpoint. After a configurable threshold (default: 3), the endpoint is automatically disabled.
Developers can:
- View health via
client.endpoints.getHealth(endpointId) - Re-enable via
client.endpoints.reenable(endpointId) - Manually disable via
client.endpoints.disable(endpointId)
Client handling
try {
await client.fetch("/p/myapp/summarize", { method: "POST", body: "..." });
} catch (error) {
if (error instanceof APIError && error.statusCode === 503) {
// Endpoint unavailable — retry later, do not attempt payment
}
}
Difference from execution failure after payment
| Scenario | Status | Payment | Refund |
|---|---|---|---|
| Endpoint unavailable | 503 | None | N/A |
| Execution failed after payment | 502 | Captured | Queued |