# Inspect run failure

Inspect run failure

`GET /api/threads/{id}/runs/{runId}/failure`

Required permission: `thread:read`.

## Parameters

| Name | In | Type | Required | Description |

| --- | --- | --- | --- | --- |

| `id` | path | `string` | Yes | — |

| `runId` | path | `string` | Yes | — |

## Example request

```bash
curl --request GET \
  --url https://api.hoplite.sh/api/threads/id/runs/runId/failure \
  --header "X-Api-Key: $HOPLITE_API_KEY"
```

## 200 response

Successful response

Content type: `application/json`. Response type: `object`.

| Field | Type | Required | Constraints | Description |
| --- | --- | --- | --- | --- |
| `ok` | `boolean` | Yes | constant true | — |
| `detail` | `object` | Yes | — | — |
| `detail.code` | `string` | Yes | — | — |
| `detail.message` | `string` | Yes | You are out of credits · Your provider is out of credits · The Codex usage limit has been reached · Your provider's usage limit has been reached · Your ChatGPT plan doesn't include the selected model · The sandbox limit has been reached · Sorry, an error occurred · Access to the repository has been lost · The Hoplite assistant's daily usage limit has been reached · The model provider blocked the request · The provider did not accept the image · Too many images for this model · The provider suspended the account · The provider is at capacity · The model connection failed · The selected model has been retired · The model is not available · The workspace is not ready · Sorry, an error occurred · Sorry, an error occurred · Sorry, an error occurred · Sorry, an error occurred · The thread spend limit has been reached · The workspace budget has been reached · Your subscription is inactive; resubscribe to continue · Click to reauthenticate Codex · The custom provider rejected your credentials · The provider's rate limit has been reached · The context limit has been reached · You're being rate limited; please try again · The approval request timed out | — |
| `detail.resetsAt` | `string` | No | — | — |
| `detail.subscriptionFallback` | `object` | No | — | — |
| `detail.subscriptionFallback.modelDisplayName` | `string` | Yes | — | — |
| `detail.subscriptionFallback.modelId` | `string` | Yes | — | — |
| `detail.subscriptionFallback.option` | `string` | Yes | credits · free_allowance · add_credits · upgrade · unavailable | — |

```json

```

## Response headers

| Header | Type | Statuses | Description |

| --- | --- | --- | --- |

| `RateLimit` | `string` | `200`, `400`, `401`, `402`, `403`, `404`, `409`, `410`, `429`, `500`, `501`, `503` | Current ingress policy, remaining requests, and seconds until reset, for example `"ingress";r=599;t=60`. |

| `RateLimit-Policy` | `string` | `200`, `400`, `401`, `402`, `403`, `404`, `409`, `410`, `429`, `500`, `501`, `503` | Ingress quota and window, for example `"ingress";q=600;qu="requests";w=60`. |

| `X-RateLimit-Limit` | `integer` | `200`, `400`, `401`, `402`, `403`, `404`, `409`, `410`, `429`, `500`, `501`, `503` | Maximum requests allowed in the current rolling window. |

| `X-RateLimit-Remaining` | `integer` | `200`, `400`, `401`, `402`, `403`, `404`, `409`, `410`, `429`, `500`, `501`, `503` | Requests remaining in the current rolling window. |

| `X-RateLimit-Reset` | `integer` | `200`, `400`, `401`, `402`, `403`, `404`, `409`, `410`, `429`, `500`, `501`, `503` | Unix timestamp when the current rolling window resets. |

| `x-request-id` | `string` | `200`, `400`, `401`, `402`, `403`, `404`, `409`, `410`, `429`, `500`, `501`, `503` | Request correlation ID. |

| `Retry-After` | `integer` | `429`, `503` | Seconds until another request should be attempted. |

| `X-Retry-After` | `integer` | `429`, `503` | Legacy retry delay in seconds. |

## Status codes

- `200` — Successful response

- `400` — Invalid request. Validation responses include field paths.

- `401` — The API key is missing, invalid, or lacks the operation's permission.

- `402` — The organization does not have access to the requested product capability.

- `403` — The key's current user no longer has the required organization membership or role.

- `404` — The resource is not available in the authenticated scope.

- `409` — The request conflicts with a retry receipt or current resource state.

- `410` — The event cursor has expired; capture a fresh head and resource snapshot.

- `429` — The API-key rate limit has been exceeded.

- `500` — The API encountered an unexpected failure.

- `501` — The deployment has not configured the requested capability.

- `503` — A required API dependency, including the rate limiter, is unavailable.