The app reports that a page stopped
const url = 'https://api.sloose.com/report/crash';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","messageClass":"read-of-nothing","build":"example","page":"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://api.sloose.com/report/crash \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "messageClass": "read-of-nothing", "build": "example", "page": "example" }'Sent by the app’s root error boundary: the error’s name, one of a closed list of kinds of failure, the build and the kind of page. Nothing else is accepted, and nothing is stored: staff are mailed at most once a day for one kind of crash, and at most ten crash alerts a day in all, each sent to every staff member. Needs no sign-in and carries no session. A name or page kind this API does not know is taken as Error or other. A page that stopped only because Sloose was updated while it was open is not a crash and sends nothing.
Request Bodyrequired
Section titled “Request Bodyrequired”What a page that stopped tells us, and nothing else.
object
Responses
Section titled “Responses”Noted.
A write that carries nothing back.
object
Example
{ "ok": true}The request — its body or its query — did not match the schema. issues carries the Zod issue list.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}Too many reports from this client (RATE_LIMITED).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.
object
Example
{ "code": "MAINTENANCE"}Headers
Section titled “Headers”Seconds until asking again is worth it (300 while the switch is on).