Error Handling
In case of errors platform should respond with json containing details on error.
Error response example
https://stg.otkgaming.com
{
"code" : "invalid.externalToken",
"message" : "External token is invalid or expired"
}
| Property Name | Descriptio | Type | Notes |
|---|---|---|---|
| code | error code identifier | string | you can find important error codes list in sections below |
| message | human readable error message | text |
Error codes
Below you can find a list of important error codes that can be returned in error response
| Code | Message | Description | Notes |
|---|---|---|---|
invalid.externalToken | External token is invalid or expired | returned when session token passed in request is expired or wrong | can happen only in playerInfo/placeBet/bet calls |
insufficient.balance | Insufficient player balance | returned when there is not enough balance to perform an action | can happen only in bet |
transaction.already.exists | Douplicate transaction | returned when the transaction already exists | can happen in bet or win |
transaction.already.cancelled | Already cancelled | returned when the transaction already has been cancelled | can happen in bet or win |
invalid.transaction.id | Unexpected transaction id | returned for unknown transaction | |
failure | message:must not be blank | returned for any other failures that are not listed above |