# List errors

URL: https://docs.hanzo.ai/docs/openapi/event/get-event-errors

> Returns the caller org's most recently captured errors, newest first.

`GET /v1/event/errors`

> [Event →](https://docs.hanzo.ai/docs/openapi/event) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                        |
| ------------- | -------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/event/errors` |
| **Method**    | `GET`                                  |
| **Operation** | `get_event_errors`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

Returns the caller org's most recently captured errors, newest first. The
error-tracking read view over event.error — the plane table the write core's error
facts land in (errors are DELIBERATELY not on event.event) — each with its captured
exception surfaced from the attributes map as a first-class field.

The org is the validated principal's — never a parameter — and this read requires a
real bearer, NEVER the write-only publishable key: pk- can attribute a write and can
read nothing. 401 without a validated bearer, 503 when the warehouse is unreachable.

## Request

1 field.

| Field   | In    | Type    | Required | Description                                     |
| ------- | ----- | ------- | -------- | ----------------------------------------------- |
| `limit` | query | integer | —        | Limit is how many rows to return, newest first. |

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | event.errorList | ok      |
| `default` | problem-details | refused |

`200` body — 13 fields.

| Field                   | In   | Type                   | Always | Description                                                                                                              |
| ----------------------- | ---- | ---------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------ |
| `data`                  | body | event.capturedError\[] | —      | Data is the errors, newest first.                                                                                        |
| `data[].distinctId`     | body | string                 | —      | DistinctID is the person/visitor the error is attributed to.                                                             |
| `data[].event`          | body | string                 | —      | Event is the event name the error was stored under, e.g. $error.                                                         |
| `data[].exception`      | body | any                    | —      | Exception is the captured error itself — the {type, message, stack, handled} object, already redacted at the fold point. |
| `data[].id`             | body | string                 | —      | ID is the row's stable event id — the client's own idempotency id when it sent one, else the server-minted one.          |
| `data[].library`        | body | string                 | —      | Library is the client SDK that reported the error.                                                                       |
| `data[].libraryVersion` | body | string                 | —      | LibraryVer is that SDK's version.                                                                                        |
| `data[].path`           | body | string                 | —      | Path is the URL's path component.                                                                                        |
| `data[].product`        | body | string                 | —      | Product is the surface that emitted the error.                                                                           |
| `data[].properties`     | body | any                    | —      | Properties is the row's whole property bag, returned verbatim as stored — any JSON object, $exception included.          |
| `data[].sessionId`      | body | string                 | —      | SessionID groups the events of one visit.                                                                                |
| `data[].timestamp`      | body | string                 | —      | Timestamp is when the error was captured, RFC3339 UTC.                                                                   |
| `data[].url`            | body | string                 | —      | URL is the full page address the error fired on.                                                                         |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo event errors
```

**SDK**

**.ts**

```ts
import { Configuration, EventApi } from 'hanzoai';

const api = new EventApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getEventErrors();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import EventApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = EventApi(client).get_event_errors()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.EventAPI.GetEventErrors(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, event_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = event_api::get_event_errors(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.EventApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new EventApi(client).getEventErrors();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/event/errors \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **event** through the `event` tool, which names its 9 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "get_event_economic"
         }
       }
     }'
```

---

[Event API](https://docs.hanzo.ai/docs/openapi/event) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
