Skip to content

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_id and trace_id are 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.
  • code indicates 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_url provides a link to the documentation for further information about this error code.
  • message provides 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 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 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 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 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 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",
}

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",
}

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",
}

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.

FieldTypeDescription
ban_reasonstringWhy the player was banned. One of manual or chargeback.
banned_onstringWhen the ban was issued, as an ISO 8601 timestamp.
banned_untilstringWhen the ban expires, as an ISO 8601 timestamp. Absent when the ban is permanent.
permanentbooleantrue 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);
}
});

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.