GuidesError handling
Error handling
A failed call returns ok: false, an error code and usually a message you can show. Read the HTTP status together with error.
202 still_runningis not a failure. Send the identical request again and it continues the same job.401:unauthorizedmeans the key is not recognised.sign_in_requiredon a video action is a step for the person, not a failure: showsign_in_url, then repeat the request withsign_in_code.429:rate_limitedmeans the daily allowance is used up; wait, or use a key.slow_down,busyandqueue_fullare short-term; try again shortly.503means the engine could not do the job right now. Nothing was done; try again. It never means that nothing matched. Where an action's notes say a retry will not help, follow them.400means a parameter is missing or out of range; the message says which.- In code, branch on the HTTP status first and then on
error. Some validation errors carry a sentence inerrorrather than a code, so showmessage(orerror) to people rather than matching its exact words.
Every action lists its own errors in the API Reference.
