---
title: "Report Client Error"
method: POST
path: "/client-errors"
tags: ["client-errors"]
---

# Report Client Error

`POST /client-errors`

## Request

- Base URL: `https://app.zeno-works.ch` (the document declares no server; this is the origin it was published from)
- URL: `https://app.zeno-works.ch/client-errors`
- Auth: none declared

Store one SPA error report (fire-and-forget; always 202).

The ``company_id`` is debugging **context**, not ownership, so a value the caller
may not claim is silently nulled rather than refused — the always-202
fire-and-forget contract above must hold. A company-scoped API key may claim only
its bound company: ``is_member`` is admin-bypassing and ``ClientErrorLog`` is
GLOBAL, so without this an admin-owned scoped key could attribute telemetry to any
tenant (ZET-176).

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Request body

- ClientErrorIn: One error report from the SPA reporter (``POST /client-errors``).
  - `kind` 'window_error' | 'unhandled_rejection' | 'react_boundary' | 'route_error' | 'api_error' | 'query_error' | 'server_signal', required: Where a ``client_error_log`` report originated in the SPA (doc/architecture.md §"Client error telemetry"). ``window_error`` — uncaught exception (``window`` error event); ``unhandled_rejection`` — unhandled promise rejection; ``react_boundary`` — caught by the app-level React ErrorBoundary; ``route_error`` — caught by a React Router ``errorElement``; ``api_error`` — API call failed (5xx or network); ``query_error`` — non-API exception surfaced through the TanStack Query cache; ``server_signal`` — **not** from the SPA: an operational signal the api itself raises, where the alternative is a log line on the deploy host with whatever retention docker's json-file driver happens to have. Signup throttle trips and allowlist refusals are the first: they are how an operator learns a public mail-sending endpoint is being abused, and that must not be a `grep`.
  - `message` string, required
  - `name` string, nullable
  - `stack` string, nullable
  - `component_stack` string, nullable
  - `source` string, nullable
  - `lineno` integer, nullable
  - `colno` integer, nullable
  - `route` string, nullable
  - `href` string, nullable
  - `app_version` string, nullable
  - `session_id` string, nullable
  - `occurred_at` string, date-time, nullable
  - `company_id` string, nullable
  - `context` object, nullable

## Response `202`

Successful Response

- ClientErrorAck: 202 ack for a report; ``id`` is null when the storm guard dropped it.
  - `id` string, nullable
  - `fingerprint` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zeno-works/apis/zeno-api.md) · [All operations](https://skmtc.dev/zeno-works/apis/zeno-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zeno-works/apis/zeno-api/revisions/1eb93dde146c?raw)
