---
title: "Browser error report, sent by the interface itself. Agents need not call it."
method: POST
path: "/api/erro-cliente"
---

# Browser error report, sent by the interface itself. Agents need not call it.

`POST /api/erro-cliente`

## Request

- Base URL: `https://okfindex.com`
- URL: `https://okfindex.com/api/erro-cliente`
- Auth: none declared

The interface reports on its own JS errors, unhandled rejections, scripts/CSS that failed to load and CSP blocks — once per session — and the app reports handled failures through `window.mmErro.relata`. The server validates the envelope, redacts credentials, e-mails and phone numbers, merges repeats of the same failure per minute and records an operational event; nothing is written to a database. It keeps no IP, cookie, query string or full User-Agent. Always answers 204, even for an invalid report.
Returns: 204 with no body, always — an invalid, repeated or over-cap report also gets 204.

## Request body

- object
  - `code` string, required: Failure code, `UI-` + letters/digits (`UI-JS-001` global error, `UI-PROMESSA-001`, `UI-RECURSO-001`, `UI-CSP-001`, `UI-APP-001` app report).
  - `phase` string, required: Where it broke, lowercase: `global`, `promessa`, `script`, `load_list`…
  - `path` string: Path of the open page, without query; numbers, hashes and tokens in it are kept as `:id`.
  - `message` string: Error message, up to 2000 characters.
  - `stack` string: Stack trace, up to 12000 characters.
  - `source` string: Originating script; only its path is kept.
  - `line` integer: Line in the originating script.
  - `column` integer: Column in the originating script.
  - `visivel` boolean: Whether the tab was visible when it broke.
  - `build` string: Build of the reporting page (its `<meta name="build">`), up to 64 letters, digits, `.`, `_` or `-`; it dates the failure.

## Response `200`

204 with no body, always — an invalid, repeated or over-cap report also gets 204.

---

[API](https://skmtc.dev/okfindex/apis/okf-index.md) · [All operations](https://skmtc.dev/okfindex/apis/okf-index/llms.txt) · [OpenAPI document](https://skmtc.dev/okfindex/apis/okf-index/revisions/4b13ca3c739f?raw)
