<!-- source: https://secondlayer.tools/docs/api-reference#list-deployment-errors -->

## List a subgraph's handler errors

`GET /api/subgraphs/{name}/errors` (self-hosted instances only)

Handler errors grouped by message and stack frame, most frequent first. A bug that throws on every event is one group with a count, plus a sample transaction to reproduce it.

### Path parameters

| Name | Type | Description |
| --- | --- | --- |
| `name` | string, required | Subgraph name, as deployed. Lowercase letters, digits and hyphens. |

### Range and paging

| Name | Type | Description |
| --- | --- | --- |
| `limit` | integer | Groups to return, 1 to 50. Default 20. |

### Responses

- `200` Error groups
- `401` This bind requires the instance token, and it was missing or wrong
- `404` No subgraph by this name on this instance (`SUBGRAPH_NOT_FOUND`)

### Example

```bash
curl http://127.0.0.1:3800/api/subgraphs/{name}/errors \
  -H "Authorization: Bearer $INSTANCE_TOKEN"
```

```json
{
  "data": [
    {
      "message": "Cannot read properties of undefined (reading 'amount')",
      "frame": "handlers/swap.ts:14:22",
      "eventType": "print",
      "sourceName": "swaps",
      "count": 312,
      "sampleTxId": "0x8d2f6a91c4e07b35d1a8f2e69c0b47d3a5e18f62b9c04d7e3a16f58b2c9d0e41",
      "sampleBlockHeight": 9031477,
      "firstSeen": "2026-10-16T09:02:11.000Z",
      "lastSeen": "2026-10-16T13:41:56.000Z"
    }
  ]
}
```
