Skip to main content

Errors and limits

Experimental

Extension communication is experimental. The manifest, commands, queries, lock events, endpoints and webhooks can change in incompatible ways or be removed. Changes are listed in the API changelog.

When Chaster refuses a call before running it, it answers with an HTTP error and a stable code your extension can rely on.

Error format​

{
"statusCode": 422,
"code": "command-unavailable",
"message": "command-unavailable",
"details": { "reason": "lock-not-active" }
}

details is present only for some codes.

Error codes​

StatusCodeMeaning
400invalid-command-idThe command id is not a valid capability id.
403caller-not-allowedThe capability does not list extension (or the current caller) in invocableBy.
403reserved-namespaceThe lock namespace belongs to Chaster.
403foreign-namespaceYou emitted an event outside your own namespace.
404not-installedThe target extension is not installed on this lock.
404unknown-commandNo such command or query on this lock.
404unknown-eventThe event is not declared in your manifest.
404options-not-declaredThe field has no x-chaster-options.
409idempotency-key-conflictThe idempotencyKey was already used for another command on this lock.
422command-unavailableThe command is unavailable right now. details.reason says why, for example lock-not-active.
422invalid-inputThe input does not match the inputSchema.
422invalid-payloadThe event payload does not match the payloadSchema.
422invalid-actoractor is keyholder on a lock without a keyholder.
422invalid-causationcausationId is not an event or invocation your extension can refer to on this lock.
422depth-exceededThe chain of calls reached the maximum depth.
422start-not-supportedstart commands of partner extensions cannot be called.
422not-dispatchableThe target extension has no endpoint or webhook credentials to receive calls.
422invocable-by-widenedAn availability push tried to add callers that the manifest does not allow.
429rate-limitedA rate limit was reached. See below.
502options-unavailableThe query behind x-chaster-options failed.
503partner-busyThe target extension already handles too many calls. details.retryAfterSeconds is 1.

Rate limits​

Calls to commands and queries and emitted events count toward two limits:

  • Per extension and lock: 120 per minute. When your extension exceeds it, it is blocked on that lock for 5 minutes, and a visible line is added to the lock history.
  • Per lock: 300 per minute, all extensions together.

A refused call returns 429 with details:

{ "bucket": "extension", "retryAfterSeconds": 240 }

bucket is extension, lock, or options for dynamic choices (60 requests per minute per lock and caller). Wait retryAfterSeconds before calling again.

These limits also apply to lock actions and to the endpoints of the Tasks, Penalties, Hygiene opening, Verification picture and Pillory APIs.

Depth limit​

A chain of calls and events (an event causing a call, causing an event, and so on) stops at a depth of 8. The call that exceeds it is refused with depth-exceeded, and counts toward the rate limit of the extension that started the chain.

Other limits​

LimitValue
Response time of an invoked extension10 seconds
Response size of an invoked extension64 KiB
Options returned by x-chaster-options200, up to 32 KiB, cached 20 seconds
Nesting of input and payload64 levels
Invocation retention30 days
Hidden event retention30 days