Error catalogue
Every failure surfaces as a typed IrtioError with a stable code, so you can
branch on it instead of parsing messages.
import { IrtioError } from '@irtio/client';
try {
await room.rpc.play({ card });
} catch (e) {
if (e instanceof IrtioError && e.code === 'RPC_REJECTED') nudge();
else throw e;
} Connection
| Code | Cause | Recover |
|---|---|---|
ROOM_NOT_FOUND | no room with that id | create one, or check the id |
ENV_UNKNOWN | bad env in joinRoom | match a deployed environment |
DISCONNECTED | transport dropped | auto-reconnects; show a banner |
RESUME_EXPIRED | reconnected past the grace window | re-join fresh |
Writes & RPCs
| Code | Cause | Recover |
|---|---|---|
NOT_OWNER | wrote an entity you don’t own | route it through an RPC |
VALIDATION_FAILED | a validate threw | fix the input; read e.detail |
RPC_REJECTED | handler returned a rejection | surface it to the player |
RPC_UNKNOWN | called an RPC not in the schema | redeploy the room |
Limits
| Code | Cause | Recover |
|---|---|---|
RATE_LIMITED | too many RPCs/writes | back off; see e.retryAfter |
STATE_TOO_LARGE | room state exceeds the cap | prune or split rooms |
ROOM_FULL | player cap reached | matchmake into another room |
See limits & pricing for the ceilings behind these.
Next steps
Placeholder reference.