# Why our error messages have a number
Author: Digest Engineering
Author URL: https://dmeodigest.superblog.click/author/digest-engineering/
Published: 2026-08-02
Category: Engineering
Category URL: https://dmeodigest.superblog.click/category/engineering/
Meta Title: Why our error messages have a number · Digest
Meta Description: Every error Digest returns carries a stable code. What the codes are for, and how we stop them changing.
Tags: api, engineering, errors
Tag URLs: api (https://dmeodigest.superblog.click/tag/api/), engineering (https://dmeodigest.superblog.click/tag/engineering/), errors (https://dmeodigest.superblog.click/tag/errors/)
URL: https://dmeodigest.superblog.click/why-our-error-messages-have-a-number/

![A terminal window showing code on a dark screen](https://images.unsplash.com/photo-1617040619263-41c5a9ca7521?ixid=M3w3OTAzOTJ8MHwxfHNlYXJjaHwzfHx0ZXJtaW5hbCUyMGNvZGUlMjBzY3JlZW4lMjBkYXJrfGVufDF8MHx8fDE3ODg2Mzg0NTF8MA&ixlib=rb-4.1.0&w=1600&q=80&auto=format&fit=crop)

Every error response from Digest looks like this:

```
{ "error": { "code": "E2041", "message": "cursor has expired", "docs": "https://docs.digest.example/errors/E2041" } }
```

The code is the part that matters. Here is why.

## Messages change; codes do not

A message is for a person reading a log. We reword them when they are unclear. A client that matches on message text breaks when we do. A code is a contract: E2041 has meant "cursor expired" since 1.0 and will mean it in 4.0.

## Codes are searchable

Every code has a page. The page says what it means, why it happens, and what to do. Support answers a question about E2041 by sending the link.

## How we keep them stable

- Codes live in one file. Adding one is a pull request that requires a docs page in the same change.
- Removing one is not allowed. A code that no longer occurs stays in the file, marked retired, so it can never be reused for something else.
- A test fails if a code is returned that is not in the file.

## Ranges

E1xxx is authentication, E2xxx is requests, E3xxx is limits, E5xxx is us. If you see an E5, it is our fault and the status page will already say so.


---
This blog is powered by Superblog. Visit https://superblog.ai to know more.
---

