---
title: "Error Reference | Grafana Cloud documentation"
description: "Error Reference Legacy API Warning The Grafana Cloud k6 endpoints under this section are deprecated and planned for removal in the near future. Migrate to the latest API endpoints to avoid disruptions."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Error Reference Legacy API

> Warning
> 
> The Grafana Cloud k6 endpoints under this section are deprecated and planned for removal in the near future. Migrate to the latest [API endpoints](../../) to avoid disruptions.

The API returns errors in the following format:

JSON ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```json
{
  "error": {
    "message": "<error text>",
    "code": 1,
    "detail_code": 99,
    "field_errors": {
      "fieldname1": ["error1", "error2"],
      "fieldname2": ["error1", "error2"]
    },
    "errors": ["error1", "error2"]
  }
}
```

`message` and `code` **are required fields**:

- **`message`** describes the error.
- **`code`** is an internal numerical identifier, useful when reporting problems to k6 support.

All other fields are optional. The `field_errors` object will have keys named after the data field causing a problem (`fieldname1` and `fieldname2` above are just examples) whereas the `errors` array will hold details about any other errors.

The most common error codes are (not a full list):

Expand table

| Error Code | Description            |
|------------|------------------------|
| 0          | UNKNOWN                |
| 1          | GENERAL                |
| 2          | VALIDATION             |
| 3          | NOT\_FOUND             |
| 4          | NOT\_ALLOWED           |
| 5          | NOT\_AUTHENTICATED     |
| 6          | AUTHENTICATION\_FAILED |
| 7          | METHOD\_NOT\_ALLOWED   |
