Ruwana Developer Documentation
Handle errors without creating duplicate production.
Public errors use JSON with ok:false and an error identifier. Production clients should distinguish validation/authentication problems from safe same-request retries and terminal production states.
| HTTP | Current meaning | Representative error | Client action |
|---|---|---|---|
| 400 | Invalid field, missing required input or idempotency key | idempotency_key_required | Fix the request. |
| 401 | Public API credential invalid | api_key_invalid | Replace/fix the key. |
| 402 | Available wallet cannot cover the reservation | insufficient_wallet_balance | Fund the wallet before retrying. |
| 404 | Route/request/product not found | request_not_found | Verify the route and owner-bound ID. |
| 409 | Idempotency conflict or terminal failed request | idempotency_key_conflict | Do not change a request under the same key. |
| 413 | Body or uploaded file exceeds its limit | body_too_large | Reduce the upload. |
| 415 | Unsupported content type / multipart required | multipart_required | Use the documented transport. |
| 422 | Motion media duration outside accepted production window | motion_duration_invalid | Use a 3–30 second motion source. |
| 503 | Logical request entered terminal manual review | manual_review | Do not blind-resubmit production. |
Safe retry rule
If a transport/network failure prevents your client from knowing whether the POST was accepted, retry the same logical request with the same Idempotency-Key. Do not create a new key just because the HTTP connection was uncertain.
Manual review is intentionally terminal. It exists to prevent automatic duplicate execution when Platform cannot safely prove whether a production/finalization step should be repeated.