> ## Documentation Index
> Fetch the complete documentation index at: https://docs.costgraph.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Every failure on /v1 is an RFC 9457 problem document with a stable code

On `/v1`, every error response is an RFC 9457 problem document
(`application/problem+json`) with a stable `code` you can branch on:

```json theme={null}
{
  "type": "https://docs.costgraph.ai/pricing/errors/price_not_found",
  "title": "Price not found",
  "status": 404,
  "detail": "No price matches this machine shape in us-east1.",
  "instance": "/v1/pricing/compute",
  "code": "price_not_found"
}
```

`title` is the same for every occurrence of a code; `detail` explains this
occurrence; `instance` is the request path.

Validation failures also carry `errors[]`, one entry per invalid field. Each
entry has two string fields: `pointer`, a JSON Pointer (RFC 6901) into the
request the server received (`/entries/0/region` names a field in the body,
`/limit` a query parameter), and `detail`, what is wrong with that value.
Pointers address the request, never the stored row.

The deprecated unprefixed routes keep their original `{"error": "..."}` bodies.

<CardGroup cols={3}>
  <Card title="Validation and request errors" icon="triangle-exclamation" href="/pricing/errors/validation_failed">
    invalid\_request\_body, validation\_failed, invalid\_pagination, immutable\_field
  </Card>

  <Card title="Credential and tenancy errors" icon="key" href="/pricing/errors/unauthenticated">
    unauthenticated, organization\_unavailable
  </Card>

  <Card title="Lookup and server errors" icon="magnifying-glass" href="/pricing/errors/price_not_found">
    not\_found, price\_not\_found, duplicate\_price, rate\_limited, internal\_error
  </Card>
</CardGroup>
