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
andtrace_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"
}
The 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": "insufficient_funds",
"doc_url": "https://docs.lootlocker.com/reference/error-codes#insufficient_funds",
"message": "Insufficient funds",
}
Last modified 18d ago