-
Standard HTTP response codes are used:
-
200 OKfor success -
400 Bad Requestfor validation errors -
401 Unauthorizedif authentication fails -
500for internal errors
-
-
Error responses include a descriptive code and message:
Error Response Example
{
"error": {
"code": "INVALID_REQUEST",
"message": "Detailed error message describing the issue."
}
}
|
Code |
Is Retryable? |
Description |
|---|---|---|
|
INVALID_REQUEST |
No |
Some sort of request model validation error has occurred. |
|
PLAYER_UNAUTHORIZED |
No |
Player is not allowed to take this action. Could be due to geo-location blocking, a locked account, expired token, etc. |
|
SERVER_UNAUTHORIZED |
No |
This API call is not allowed. Normally due to failing HMAC check. |
|
INSUFFICIENT_FUNDS |
No |
Player does not have enough funds to cover the DEBIT event. This transaction should be rolled back on the game provider side. |
|
REGION_BLOCKED |
No |
Request is from an IP address that is not allowed. |
|
SESSION_EXPIRED |
Yes |
Currently the player is offline, and the request cannot be attempted at this point. |
|
VALIDATION_FAILED |
No |
Validation of the request has failed. For example a credit or debit amount that is negative, or a credit request before a successful debit was processed. |
|
DEBIT_FAILED |
Yes |
The debit is in an unknown state, and needs to be retried. |
|
DEBIT_ROLLED_BACK |
No |
The debit was rolled back, and the round has been cancelled. |
|
CREDIT_FAILED |
Yes |
The credit is in an unknown state, and needs to be retried. |
|
RETRY_REQUIRED |
Yes |
Error occurred during game round cancellation or get balance request. Also used in the case of network, or any other error. These are safe for idempotent retries |