# Logs and Client Errors

> Turn on Workers Logs, find server and browser errors in the Cloudflare dashboard, and know what the client error reports leave out.

*Canonical: https://makerkit.dev/docs/void-cloudflare/operations/logs-and-client-errors*

---

Both server and browser errors end up in one place: Workers Logs in your Cloudflare dashboard.

## Workers Logs Is On

`apps/web/void.config.ts` sets `observability: { enabled: true }` in `cloudflare`, so every deploy turns Workers Logs on for your Worker. To read the logs: Workers & Pages → your Worker (`web`) → Observability.

A deploy applies that file: turning it off in the dashboard alone does not last. To turn it off, remove the line.

Retention, sampling and the free allowance are Cloudflare settings ([Workers Logs](https://developers.cloudflare.com/workers/observability/logs/workers-logs/)). How the kit logs is in [Logging](../development-guide/logging).

## What Gets Reported From the Browser

The root layout installs a small reporter on every page, including the marketing pages. It sends:

- uncaught errors, and unhandled promise rejections, including an uncaught React render error;
- once per page load for the same error, and at most 5 reports per page load;
- to `POST /api/client-errors`, without cookies, so it works signed out and while your database is down.

Each report is the message, the stack and the page path. The server logs it as one entry:

| Field | Holds |
|---|---|
| `message` | `client error` |
| `report.message`, `report.stack`, `report.path` | What the browser sent, cut to 500, 4096 and 200 characters |
| `userAgent` | The browser's user agent, cut to 256 characters. The one request header the kit logs |
| `version` | The Worker version that received the report |

To see them, open your Worker's logs and filter on `message = "client error"`.

## What Is Removed Before It Is Logged

The text is treated as hostile: the server keeps only the known fields and removes, word by word, the origin, query and hash of every `http(s)` URL, the query and hash of any other word, tokens (a JWT, or any 32 or more characters of letters, digits, `-` and `_`), email addresses, and the token part of a path such as `/invitation/<id>`.

**Other personal text stays.** An error message that quotes what a person typed is logged as written. If your code throws errors that contain personal data, fix the message.

If one of your own pages puts a token in a path, add its pattern to `TOKEN_SEGMENTS` in `apps/web/lib/redact-path.ts`.

## What You Will Not See

- **Errors a React boundary caught.** The kit's `Trans` and any boundary you add handle their error themselves; it never reaches the window. Report one yourself if you need it.
- **Readable stacks.** The code is minified and the kit uploads no source maps.
- **Reports over the limits.** One address may send 10 a minute, and all visitors together 300 a minute per Cloudflare location, counting marketing pages too. Past the shared limit a report is dropped without a trace: a broken, busy page can hide errors of other pages. See [Rate Limits](./rate-limits).

## Limits and Safety

- Bodies over 16 KB get `413`, anything that is not a report `400`; neither is logged.
- The route does not accept other sites' browser posts (`403`) and reads no session.
