---
title: "Report Widget Client Error"
method: POST
path: "/api/v1/public/text-widget/client-error"
tags: ["text-widget-public"]
---

# Report Widget Client Error

`POST /api/v1/public/text-widget/client-error`

Relay a widget-side thrown error to Sentry.

Uses the no_enabled_check auth dep so we still capture failures when a
tenant has just toggled the widget off (the cause is often the reason for
the error in the first place). Returns 204 on accepted reports so
sendBeacon callers never see a non-success response; FastAPI's body
validation may still return 422 for malformed payloads (e.g. missing
`message` or over-length `stack`).

## Query parameters

- `key` string, nullable

## Headers

- `X-Widget-Key` string, nullable

## Request body

- ClientErrorReport — Best-effort widget-side error report relayed to Sentry.
  - `message` string, required
  - `stack` string, nullable
  - `session_id` string, nullable
  - `page_url` string, nullable
  - `user_agent` string, nullable
  - `context` object, nullable

## Response `204`

Successful Response

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/getanana/apis/cleon-api.md) · [All operations](https://skmtc.dev/getanana/apis/cleon-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getanana/cleon-api/revisions/c0f54348e251/schema)
