Report Client Error
POST
/api/client-errors
const url = 'https://example.com/api/client-errors';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"context":"example","message":"example","stack":"example","url":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/client-errors \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "context": "example", "message": "example", "stack": "example", "url": "example" }'Log a client-side error report. Never raises on a logging failure — those must not surface as a second error to the user whose original error we’re trying to record. The one deliberate exception is the per-IP throttle (GC-BE-10): beyond the bucket it answers 429 + Retry-After.
Authorizations
Section titled “ Authorizations ”Request Bodyrequired
Section titled “ Request Bodyrequired ” Media type application/json
ClientErrorReport
Body posted by the frontend’s reportError() helper.
object
Example generated
{ "context": "example", "message": "example", "stack": "example", "url": "example"}Responses
Section titled “ Responses ”Successful Response
Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}