ApiError

Family: Studio · One form

What it does

Returns why an API task failed.

Syntax

ApiError(tache integer) → string

Parameters

NameTypeMeaning
tacheintegerThe task id returned by ApiRequest().

Every form returns

string

The reason, such as not logged in, token refused (401) or rate limited (429), or an empty string if the task did not fail or the id is unknown.

Good to know

  • Editor and HTML5 exports only: native (Bevy) builds stop with an unsupported-command error.

Example · generated

DO  Print(ApiError(1))  Sync()LOOP

ApiError is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

133 commands in Studio