Learn more about error codes
Section titled “Learn more about error codes”Some responses from the LootLocker API will include an error code. These error codes are designed to help you understand what went wrong with your request. Errors containing codes will always follow a common schema:
request_idandtrace_idare unique identifiers for the request and trace, respectively. These are important pieces of information to provide when contacting support for troubleshooting, as they allow the support team to quickly locate the details of the specific transaction in question.codeindicates the type of error. This is the field you should use to determine how to handle the error in your code. The possible values are documented below.doc_urlprovides a link to the documentation for further information about this error code.messageprovides a brief, human-readable description of the error. It's important to note that this field should not be used for flow control in your code, as its content may change and is not guaranteed to be consistent. It is intended for debugging and logging purposes, and to provide a readable error message to the end user.
Some error codes may also include additional fields, such as param to indicate which parameter was missing or invalid. These fields are not guaranteed to be present outside of the error code they are documented for.
internal_server_error
Section titled “internal_server_error”Internal server error is returned when an unknown, internal error happened. It is recommended to contact LootLocker support with the request id and trace id if this error persists.
- Example:
{ "request_id": "132e392b-5a75-4ecb-99b4-e30610d1a8fe", "trace_id": "7c55f99f086390a7731a8430233cb158", "code": "internal_server_error", "doc_url": "https://docs.lootlocker.com/reference/error-codes#internal_server_error", "message": "Internal server error occurred. Please reach out to us with the request id if this issue persists.", }parameter_missing
Section titled “parameter_missing”Parameter missing is returned when a parameter required for the request is missing.
- Example:
{ "request_id": "132e392b-5a75-4ecb-99b4-e30610d1a8fe", "trace_id": "7c55f99f086390a7731a8430233cb158", "code": "parameter_missing", "doc_url": "https://docs.lootlocker.com/reference/error-codes#parameter_missing", "message": "Parameter \"game_id\" is missing", "param": "game_id"}parameter_invalid
Section titled “parameter_invalid”Parameter invalid is returned when a parameter required for the request is invalid.
- Example:
{ "request_id": "132e392b-5a75-4ecb-99b4-e30610d1a8fe", "trace_id": "7c55f99f086390a7731a8430233cb158", "code": "parameter_invalid", "doc_url": "https://docs.lootlocker.com/reference/error-codes#parameter_invalid", "message": "Parameter \"game_id\" is invalid", "param": "game_id" }request_body_invalid
Section titled “request_body_invalid”Request body invalid is returned when the request body is invalid. This can be because the request body is empty or it is not valid JSON.
- Example:
{ "request_id": "132e392b-5a75-4ecb-99b4-e30610d1a8fe", "trace_id": "7c55f99f086390a7731a8430233cb158", "code": "request_body_invalid", "doc_url": "https://docs.lootlocker.com/reference/error-codes#request_body_invalid", "message": "Request body is not valid JSON" }expectation_not_met
Section titled “expectation_not_met”Expectation not met is returned when the request is valid but does not meet the expectations of the endpoint. This can be because the request contains an invalid parameter, or because the state of the server does not reflect the action being taken.
- Example:
{ "request_id": "132e392b-5a75-4ecb-99b4-e30610d1a8fe", "trace_id": "7c55f99f086390a7731a8430233cb158", "code": "expectation_not_met", "doc_url": "https://docs.lootlocker.com/reference/error-codes#expectation_not_met", "message": "Expectation not met: Game is not subscribed",}transaction_insufficient_funds
Section titled “transaction_insufficient_funds”The transaction_insufficient_funds error code is triggered when a player attempts to perform an action that requires more virtual currency than they currently possess.
This error code is specifically returned when a player tries to make a purchase using in-game virtual currency and their balance is insufficient to complete the transaction.
- Example:
{ "request_id": "132e392b-5a75-4ecb-99b4-e30610d1a8fe", "trace_id": "7c55f99f086390a7731a8430233cb158", "code": "transaction_insufficient_funds", "doc_url": "https://docs.lootlocker.com/reference/error-codes#transaction_insufficient_funds", "message": "Insufficient funds", }insufficient_permissions
Section titled “insufficient_permissions”The insufficient_permissions error code is triggered when a user attempts to perform an action that requires a higher level of permissions than they currently possess.
- Example:
{ "request_id": "132e392b-5a75-4ecb-99b4-e30610d1a8fe", "trace_id": "7c55f99f086390a7731a8430233cb158", "code": "insufficient_permissions", "doc_url": "https://docs.lootlocker.com/reference/error-codes#insufficient_permissions", "message": "Insufficient permissions", }player_banned
Section titled “player_banned”The player_banned error code is returned with a 403 Forbidden when a banned player attempts to start a session. The ban is enforced at session start, so a banned player cannot obtain a session token and cannot make requests that require one.
The response includes a ban object describing the active ban. This object is sanitized — it never contains moderator notes or internal metadata — so it is safe to show to the player.
| Field | Type | Description |
|---|---|---|
ban_reason | string | Why the player was banned. One of manual or chargeback. |
banned_on | string | When the ban was issued, as an ISO 8601 timestamp. |
banned_until | string | When the ban expires, as an ISO 8601 timestamp. Absent when the ban is permanent. |
permanent | boolean | true when the ban has no expiry date. |
- Example:
{ "request_id": "132e392b-5a75-4ecb-99b4-e30610d1a8fe", "trace_id": "7c55f99f086390a7731a8430233cb158", "code": "player_banned", "doc_url": "https://docs.lootlocker.com/the-basics/support/error-codes#player_banned", "message": "Player is banned", "ban": { "ban_reason": "chargeback", "banned_on": "2026-04-27T07:51:09Z", "banned_until": "2026-05-27T07:51:09Z", "permanent": false }}A permanent ban omits banned_until and sets permanent to true:
{ "request_id": "132e392b-5a75-4ecb-99b4-e30610d1a8fe", "trace_id": "7c55f99f086390a7731a8430233cb158", "code": "player_banned", "doc_url": "https://docs.lootlocker.com/the-basics/support/error-codes#player_banned", "message": "Player is banned", "ban": { "ban_reason": "manual", "banned_on": "2026-04-27T07:51:09Z", "permanent": true }}To check whether a player is banned without attempting a session start, use the ban status endpoint. It returns the same ban object alongside an is_banned flag.
This endpoint does not require a player session — it is authenticated with your game API key, because the caller is typically a game client that has just been refused a session and has no token to present. Pass the player's ULID in the request body.
LootLockerSDKManager.GetPlayerBanStatus(playerUlid, (response) =>{ if (!response.success) { Debug.LogError("Failed to get ban status: " + response.errorData.message); return; }
if (response.is_banned) { Debug.Log("Banned for: " + response.ban.ban_reason); Debug.Log(response.ban.permanent ? "This ban is permanent" : "This ban expires at " + response.ban.banned_until); }});// Does not require a player session.#include "LootLockerSDKManager.h"
void UMyGameInstance::CheckBanStatus(const FString& PlayerUlid){ ULootLockerSDKManager::GetPlayerBanStatus( PlayerUlid, FLootLockerBanStatusDelegate::CreateUObject(this, &UMyGameInstance::OnBanStatusReceived));}
void UMyGameInstance::OnBanStatusReceived(const FLootLockerBanStatusResponse& Response){ if (!Response.success) { UE_LOG(LogTemp, Error, TEXT("Failed to get ban status: %s"), *Response.ErrorData.Message); return; }
if (Response.is_banned) { UE_LOG(LogTemp, Log, TEXT("Banned for: %s"), *Response.ban.ban_reason); UE_LOG(LogTemp, Log, TEXT("%s"), Response.ban.permanent ? TEXT("This ban is permanent") : *FString::Printf(TEXT("This ban expires at %s"), *Response.ban.banned_until)); }}# Authenticated with your game API key, not a player session tokencurl -X POST 'https://api.lootlocker.io/game/session/ban-status' \ -H 'Content-Type: application/json' \ -d '{ "game_api_key": "your_game_api_key", "player_id": "01HV95G8NNQK5YM1A74Y9K3418" }'When a session start fails with player_banned, the SDK surfaces the same details on the error data rather than in a successful response. In Unity, read response.errorData.ban; in Unreal, read Response.ErrorData.ban.