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

# Errors

> Errors are RFC 9457 problem details. Branch on the code.

Errors are [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem details, sent as `application/problem+json`:

```json theme={null}
{
  "type": "https://stockshift.app/problems/validation_failed",
  "title": "Unprocessable Content",
  "status": 422,
  "code": "validation_failed",
  "detail": "The request contains invalid fields.",
  "errors": { "sku": ["The sku has already been taken."] }
}
```

Branch on `code`. It is stable, while `detail` is written for people and may change.

## The codes you will meet most

| Status | `code` | What it means |
| - | - | - |
| `401` | `unauthenticated` | No token, or one that has expired or been revoked. |
| `403` | `forbidden` | The member lacks the permission or the token lacks the scope. |
| `403` | `plan_upgrade_required` | The organization's plan does not include this feature. `feature` names it. |
| `404` | `not_found` | Nothing with that ID in this organization. Records of other organizations answer this too. |
| `422` | `validation_failed` | `errors` lists each invalid field and what is wrong with it. |
| `422` | `idempotency_key_reused` | The `Idempotency-Key` was already used on a different call. |
| `429` | `too_many_requests` | Slow down. See [Rate limits](https://docs.stockshift.io/guides/rate-limits.md). |


## Related topics

- [Rust](https://docs.stockshift.io/sdks/rust.md)
- [Go](https://docs.stockshift.io/sdks/go.md)
- [Python](https://docs.stockshift.io/sdks/python.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.