Skip to content

The app reports that a page stopped

POST
/report/crash
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.

Media typeapplication/json

What a page that stopped tells us, and nothing else.

object
name
required
string
/^[A-Za-z][A-Za-z0-9_]{0,39}$/
messageClass
required
string
Allowed values: read-of-nothing not-a-function render-loop out-of-memory parse network storage other
build
required
string
/^[A-Za-z0-9._-]{1,64}$/
page
required
string
/^[a-z][a-z-]{0,30}$/

Noted.

Media typeapplication/json

A write that carries nothing back.

object
ok
required
boolean
Example
{
"ok": true
}

The request — its body or its query — did not match the schema. issues carries the Zod issue list.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Too many reports from this client (RATE_LIMITED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
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.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed value: MAINTENANCE
Example
{
"code": "MAINTENANCE"
}
Retry-After
integer

Seconds until asking again is worth it (300 while the switch is on).

Report a problem with this page

sloose.com