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

# errors

> Every error this API returns.

When something goes wrong, the response body looks like this:

```json theme={null}
{
  "success": false,
  "error": {
    "code": "...",
    "message": "...",
    "details": { }
  }
}
```

The `details` object is optional and varies per error for example, `INSUFFICIENT_INVENTORY` includes the items with stock shortfalls.

## All error codes

| Code                      | HTTP | Endpoints         | Plain-English meaning                                                                                          |
| ------------------------- | ---- | ----------------- | -------------------------------------------------------------------------------------------------------------- |
| `VALIDATION_FAILED`       | 400  | both              | The request body is missing a field or has the wrong type. The response says which field.                      |
| `INVALID_PART_TOKEN`      | 400  | orders            | A `part_id` you sent isn't recognized. Look up the part again.                                                 |
| `INVALID_API_KEY`         | 401  | both              | Your API key is missing, malformed, or wrong.                                                                  |
| `KEY_REVOKED`             | 401  | both              | The API key you used was revoked. Email [info@skynetparts.com](mailto:info@skynetparts.com) for a replacement. |
| `INSUFFICIENT_INVENTORY`  | 409  | orders            | One or more items don't have enough stock. Response lists which.                                               |
| `IDEMPOTENCY_CONFLICT`    | 409  | orders            | You sent an `Idempotency-Key` we've already seen, but with a different order body.                             |
| `IDEMPOTENCY_IN_PROGRESS` | 409  | orders            | A request with this `Idempotency-Key` is still being processed. Retry shortly.                                 |
| `RATE_LIMITED`            | 429  | catalog, products | Too many requests in a short window. Retry in a few seconds.                                                   |
| `UPSTREAM_ERROR`          | 502  | catalog, products | Catalog lookup failed on our end. Safe to retry.                                                               |
| `ORDER_FAILED`            | 502  | orders            | Order placement failed on our end. Your order was not placed. Safe to retry.                                   |
| `UPSTREAM_TIMEOUT`        | 504  | catalog, products | The catalog lookup timed out. Safe to retry.                                                                   |

Note: parts that aren't in our catalog are returned in the `not_found` array of a successful Look Up Parts response  they are not an error.

If you hit an error not in this list, email [info@skynetparts.com](mailto:info@skynetparts.com) with the response body and timestamp.
