Skip to Content
Pocket Notifier

Errors

Error format, codes, and rate limits.

Errors use oRPC's error body. The HTTP status matches the code.

{
  "defined": true,
  "code": "FORBIDDEN",
  "status": 403,
  "message": "Not allowed for this project or resource"
}

defined: true means the error is declared in the contract (ERRORS in packages/contract/src/errors.ts), so clients can rely on its code and data. An undeclared error is a bug and shows up as 500 INTERNAL_SERVER_ERROR.

Codes

StatusCodeWhendata
400BAD_REQUESTThe input does not match the contractValidation issues
401UNAUTHORIZEDMissing, malformed, revoked or expired token or session
403FORBIDDENThe project is not in the token's scope, or the role does not allow the action
404NOT_FOUNDThe project, message or other resource does not exist or has expired
409CONFLICTThe name is taken, or the person already responded to that action
413PAYLOAD_TOO_LARGEAttachment over the size cap{ "maxBytes": 15728640 }
429TOO_MANY_REQUESTSRate limit hit{ "retryAfterSeconds": 12 }

A 404 is returned instead of 403 when the caller is not a member at all, so project names cannot be discovered by guessing.

Rate limits

Open Proposed limits per access token:

LimitValue
Messages per minute60
Messages per day1,000
Attachment uploads per day100

Responses to 429 also include a Retry-After header. The limits are enforced with Cloudflare's Rate Limiting binding, keyed by token ID.

On this page