Failure Modes and Recovery Guide

Actionable error patterns and recovery actions for messaging, media handling, and device lifecycle operations.

HTTPCodeMeaningAction
400validation_errorInvalid payload, field mismatch, unsupported value, or malformed JSON.Fix request fields and data format.
401invalid_api_key / unauthorizedMissing or invalid Bearer token, or request does not satisfy internal auth/whitelist policy.Use Authorization: Bearer <app_token> for direct runtime calls, or call through approved Onebrick internal path/source.
401invalid_rotation_pinThe manual app-token rotation PIN is missing or invalid.Retry from the FE rotation dialog with the correct PIN.
403app_token_rotation_disabledApp token rotation PIN is not configured for the current runtime.Configure the backend PIN, then rotate manually from FE. Normal deploys/upgrades must preserve tokens.
403forbiddenResource is outside allowed scope.Use the exact device/path generated by the same flow.
404not_foundDevice/message/media not found.Check identifiers and retry if eventual consistency applies.
409device_not_connected / QR conflictDevice session is offline, still connected, or QR is still active.Disconnect first, wait for QR expiry if needed, then retry the requested operation.
413request_too_largeRequest body exceeds configured limit.Reduce payload size or use URL media source.
429rate_limit_exceededRequest throttled by limiter.Retry with backoff.
5xxinternal_error / upstream errorsTransient server/provider issue.Retry with exponential backoff and idempotency keying.

Note: internal host/IP whitelist policy applies to internal device-control routes. For webhook callback endpoints, use HMAC signature validation and optional ingress source filtering as independent controls.