Errors

Errors look like { "statusCode": 409, "message": "toy_offline", "error": "…" }. Branch on message; error is for humans.

StatusmessageMeaningWhat to do
400invalid_requestA field is missing or malformed (e.g. no Idempotency-Key)Fix the request
400invalid_tipamount isn't a whole number ≥ 1Fix the request
401invalid_keyUnknown, revoked or expired secret keyCheck the key on the dashboard
403app_suspendedYour developer app is suspendedContact us
403not_a_partnerThis app isn't enabled for Velvet LiveSend us your app id
403wrong_environmentA test key on live models, or the other way roundUse the matching key
403model_suspendedThis model is suspendedContact us
404model_not_foundNo such model for your key (or another partner's)Check the model id; mint a token first
409toy_offlineNo panel open for this model. Nothing was recordedRetry later with the same Idempotency-Key
429rate_limitedOver 600 calls a minute for this keyBack off
503live_unavailable · live_partner_api_disabledWe're unavailable or switched offRetry with backoff

live.js and the panel

CodeWhereMeaning
invalid_tip_argsreceiveTipArguments aren't (cname: string, amount: whole ≥ 1, note?: string)
toy_offlinereceiveTipNo panel open: nothing recorded
rate_limitedreceiveTipOver 10 tips at once / 5 a second for this model
token_revokedeventsThe token was rotated or revoked: get a new one from your server
model_not_foundevents, panelUnknown or revoked model token
not_a_partnerevents, panelYour partner access is switched off