Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Errors and limits

Error shape

Errors Shriek raises are JSON with one field:

{"error": "period_secs must be >= 60 (the tick cadence); a shorter period cannot be honored"}
  • 401 is always {"error":"unauthorized"} and 403 is always {"error":"forbidden"}. Neither says why.
  • 5xx is always {"error":"internal error"}.
  • Other messages are written for people and may change. There are no error codes; branch on the status.
curl -sS https://shriek.dev/v1/shriek/alerts | grep -Fx '{"error":"unauthorized"}'

Some errors are not JSON. They come from request parsing, before Shriek looks at your credential, and are plain text:

StatusCauseExample body
400The body is not valid JSON, or a query value has the wrong typeFailed to deserialize query string: since: invalid digit found in string
413Body larger than 64 KiBFailed to buffer the request body: length limit exceeded
415Body sent without Content-Type: application/jsonExpected request with `Content-Type: application/json`
422Body is JSON but a field is missing, empty, too long or not an allowed valueFailed to deserialize the JSON body into the target type: severity: unknown variant `error`, expected one of `info`, `warn`, `critical` at line 1 column 60
curl -sS -o /dev/null -w '%{http_code}\n' 'https://shriek.dev/v1/shriek/alerts?since=abc' | grep -Fx 400

Status codes

StatusMeaning
200Done. Every success is 200, including creates.
400A rule the parser doesn’t check: period_secs under 60, detail over 4096 bytes, an incident id over 256 bytes, or a tenant or service in the path that isn’t valid.
401No credential, or one Shriek can’t verify.
403A valid credential that isn’t connected to a tenant. Also the edge’s rate limit; see below.
404A heartbeat for, or publishing, a source that isn’t registered; retiring a source that was never registered; or resolving an incident that isn’t open.
413, 415, 422Parsing errors; see above.
500Something failed inside Shriek. Your alert may or may not have been recorded; read the feed before you retry, or accept a duplicate.
503Shriek couldn’t check your token: it couldn’t reach ChirpAuth, or its record of which client belongs to which tenant. Nothing was recorded; retry with backoff.

Rate limits

  • Per IP address. More than 2,000 requests from one IP address in 5 minutes are blocked at the edge with 403, until the rate falls. That response is not Shriek’s JSON.
  • Shriek has no per-tenant quotas.

Size limits

LimitValue
Request body64 KiB
service, component, title, label, public update message1 to 256 bytes, after trimming spaces
Incident id, including {service}/{component}# before a dedup_key256 bytes
detail4096 bytes
period_secsAt least 60
Tenant nameLowercase letters, digits and -, starting with a letter or digit; up to 256 bytes