Errors
Errors look like { "statusCode": 409, "message": "toy_offline", "error": "…" }. Branch on message; error is for humans.
| Status | message | Meaning | What to do |
|---|---|---|---|
| 400 | invalid_request | A field is missing or malformed (e.g. no Idempotency-Key) | Fix the request |
| 400 | invalid_tip | amount isn't a whole number ≥ 1 | Fix the request |
| 401 | invalid_key | Unknown, revoked or expired secret key | Check the key on the dashboard |
| 403 | app_suspended | Your developer app is suspended | Contact us |
| 403 | not_a_partner | This app isn't enabled for Velvet Live | Send us your app id |
| 403 | wrong_environment | A test key on live models, or the other way round | Use the matching key |
| 403 | model_suspended | This model is suspended | Contact us |
| 404 | model_not_found | No such model for your key (or another partner's) | Check the model id; mint a token first |
| 409 | toy_offline | No panel open for this model. Nothing was recorded | Retry later with the same Idempotency-Key |
| 429 | rate_limited | Over 600 calls a minute for this key | Back off |
| 503 | live_unavailable · live_partner_api_disabled | We're unavailable or switched off | Retry with backoff |
live.js and the panel
| Code | Where | Meaning |
|---|---|---|
invalid_tip_args | receiveTip | Arguments aren't (cname: string, amount: whole ≥ 1, note?: string) |
toy_offline | receiveTip | No panel open: nothing recorded |
rate_limited | receiveTip | Over 10 tips at once / 5 a second for this model |
token_revoked | events | The token was rotated or revoked: get a new one from your server |
model_not_found | events, panel | Unknown or revoked model token |
not_a_partner | events, panel | Your partner access is switched off |