SDK
Errors
Every failed call throws an AnsekaiError:
| Field | What it is |
|---|---|
code | A short name like version_conflict, compare against it |
status | The HTTP status of the answer |
retryAfter | Seconds to wait before trying again, 0 when it doesn't matter |
message | A sentence for people |
TypeScript
try {
await ansekai.data.set("hero", hero, { version });
} catch (error) {
if (error instanceof AnsekaiError && error.code === "version_conflict") {
reloadHero();
}
}Codes you will meet
| Code | Means |
|---|---|
invalid_key | The game key is wrong |
not_signed_in | The call needs a player |
token_expired | The session ended, sign in again |
invalid_credentials | Wrong email or password |
email_taken | That email has an account |
method_disabled | The game doesn't allow this way of signing in |
sdk_disabled | The module is closed to game clients |
wrong_connection | The module only takes another connection now |
game_stopped | The game was deleted or its account is held |
read_only_key, read_only_path | A rule doesn't let the client write there |
version_conflict | The value changed since it was read |
not_a_number | increment on a value that isn't a number |
value_too_large | The value is over its size |
too_many_keys | The player has 100 keys already |
key_not_found | The key isn't there |
uploads_disabled | Players can't upload in this game |
file_too_large | The file is over the largest size |
storage_full | The cloud saves of the plan are full |
cache_full | The cache has no room left |
plugin_error | The plugin crashed, the reason is in its logs |
plugin_timeout, plugin_out_of_memory | The run went over a limit |
rpc_not_found | No published plugin offers that function |
room_not_found, room_full, not_invited | Joining a room didn't work |
region_not_allowed | The game didn't pick that region for rooms |
rate_limited | Too many calls, wait retryAfter seconds |
timeout, network_error | The server didn't answer, the SDK tells these apart |
A code that a plugin passes to ansekai.fail arrives the same way, with status 422.
Updated November 21, 2026