Errors · Error document

Errors

API Errors

Failed HZURA Sports API and Casino API requests return { "error", "message" }. Match on error. Messages are static and do not include keys, player input, SQL, or upstream bodies.

Error document

JSON
{
  "error": "event_not_found",
  "message": "Event not found"
}
FieldMeaning
errorStable machine-readable code.
messageStatic sentence for that code.

GET /api/v1/health does not use this document. A healthy process returns { "status": "ok", "redis": "ok" } with HTTP 200. If either store checked by that route does not answer, it returns HTTP 503 with { "status": "degraded", "redis": "unreachable" }.

Rate-limit responses add a Retry-After header. The body stays { "error": "rate_limited", "message": "Too many requests" }.

Status codes

HTTPerrorMessageWhen
400invalid_sportUnsupported sport. Supported sports: cricket, football, tennis, horse-racing, greyhound-racing{sport} is not one of the supported sport keys.
400invalid_event_idEvent id must be a positive integer{eventId} is not a positive integer of at most 20 digits. 0 is rejected.
400invalid_queryQuery parameters are not validA games filter is empty, too long, or the query could not be read.
400invalid_pagePage must be a positive integerpage is present but not a positive integer. Omitting it uses page 1.
400invalid_limitLimit must be between 1 and 100limit is not an integer from 1 to 100.
400unsupported_currencyCurrency is not enabled for this API clientOn the games list, the currency is not in the customer allow-list. On launch, it does not match the established player or customer currency, ignoring case. On the wallet, a different three-letter uppercase currency does not equal the player's currency. Lowercase wallet currency text is invalid_wallet instead.
400invalid_providerProvider filter is not validprovider is not a provider id in the runtime catalog.
400invalid_categoryCategory filter is not validcategory is not a category id in the runtime catalog.
400invalid_launchLaunch request is not validThe launch body, game id, or JSON document is not usable. Unknown fields are rejected.
400invalid_walletWallet request is not validThe wallet body, amount, currency text, or operation is not usable. A rollback amount that does not equal the original amount uses this code.
400player_not_configuredPlayer country or currency is not configuredThe customer has no usable country, default currency, or ll_RR launch locale, so a new player cannot be stored.
403ip_not_allowedClient address is not allowedThe caller was not admitted. For an API key this covers a missing, empty, or unknown key, a disabled customer, and a CIDR miss. For a legacy sports client it covers an IP with no enabled policy. Casino calls with no customer also use this code. The body does not say which check failed.
403sport_not_allowedThis sport is not enabled for this API clientThe sport key is valid, but this client's policy does not include it.
403casino_access_disabledCasino access is not enabledThe API key identified a customer, but casino is off or the customer is not active in the casino catalog.
403game_not_availableGame is not availableThe game exists but is not launchable for this customer, currency, language, device, or demo request.
404not_foundRoute not foundThe path is unknown. The caller must already be admitted; an unadmitted caller receives ip_not_allowed instead.
404event_not_foundEvent not foundThe event id is not in that sport's published catalog.
404odds_not_foundOdds are not available for this eventThe event is in the catalog, but no odds payload is stored for it.
404game_not_foundGame not foundThe game id is not in the runtime casino catalog.
404player_not_foundPlayer not foundNo player mapping exists for this customer and player_id. Launch creates the mapping. The wallet does not.
404wallet_transaction_not_foundWallet transaction not foundRollback named a transaction this customer does not have for that player.
405method_not_allowedMethod not allowedThe path exists, but the HTTP method does not.
409insufficient_balanceWallet balance is not sufficientA debit, or a rollback of a credit, cannot reserve the amount. The provider is not called.
409wallet_idempotency_conflictWallet transaction does not match the original requestThis transaction_id was already used for a different player, operation, amount, currency, or rollback reference.
409wallet_transaction_pendingWallet transaction is still in progressThe same idempotency key is still pending after a provider timeout. Repeating it does not call the provider again.
409wallet_already_rolled_backWallet transaction is already rolled backA new rollback targets an original transaction that is already reversed.
409wallet_transaction_not_reversibleWallet transaction cannot be rolled backThe original transaction is pending, failed, a rollback, or otherwise not reversible.
413payload_too_largeRequest payload too largeA launch or wallet JSON body is larger than 8 KiB.
429rate_limitedToo many requestsThis sports client used its budget for the current window. The response includes Retry-After. Casino paths do not use this limiter.
500internal_errorInternal server errorAn unexpected failure while building a response.
502malformed_upstream_dataUpstream data could not be readA stored catalog or odds payload could not be parsed.
502launch_authentication_failedGame launch could not be authenticatedThe game provider rejected the launch credential request. The message stays generic.
502launch_failedGame launch failedThe provider rejected the launch or returned no usable URL.
502wallet_provider_failedWallet transaction failedThe provider rejected the wallet operation. A debit reservation is released. Repeating the same transaction_id returns this failure.
503security_config_unavailableService is temporarily unavailableClient or API-key policy could not be read, so the request is refused.
503catalog_unavailableEvent data is not available yet, retry shortlyThe sport catalog has not been published yet.
503redis_unavailableUpstream data store is unavailableThe data store could not be reached.
503casino_catalog_unavailableCasino catalog is not available yet, retry shortlyThe casino catalog could not be loaded.
503launch_not_configuredGame launch is not availableLaunch is not configured on this process.
503player_store_unavailablePlayer identity is not availableThe player mapping store could not be read or written.
503wallet_not_configuredCasino wallet is not availableThe wallet or its provider client is not configured.
503wallet_store_unavailableCasino wallet is not availableThe wallet ledger could not be read or written.
504redis_timeoutUpstream data store timed outA sports data-store command, including the sportsbook rate-limit counter, did not answer in time. Casino catalog reads do not return this code.
504launch_unavailableGame launch is temporarily unavailableThe launch provider did not answer, or the connection failed. Launch does not move the wallet, so the same request can be retried.
504wallet_provider_timeoutWallet transaction is temporarily unavailableThe provider did not answer. The transaction stays pending. This is not success.

Authentication

Admission failures use one code. A bad key and a CIDR miss look the same, so the response cannot be used to probe which check failed.

HTTPerrorSurface
403ip_not_allowedSports and Casino

Authorization

The caller was admitted, but the sport, casino product, or game is not enabled for that client.

HTTPerrorSurface
403sport_not_allowedSports
403casino_access_disabledCasino
403game_not_availableCasino

Validation

The path, query, or JSON body is not usable. Fix the request before retrying it.

HTTPerrorSurface
400invalid_sportSports
400invalid_event_idSports
400invalid_queryCasino
400invalid_pageCasino
400invalid_limitCasino
400unsupported_currencyCasino
400invalid_providerCasino
400invalid_categoryCasino
400invalid_launchCasino
400invalid_walletWallet
400player_not_configuredCasino
405method_not_allowedAll routes
413payload_too_largeCasino launch and wallet

Not found

The route, event, game, player, or wallet transaction is not available to this caller.

HTTPerrorSurface
404not_foundAll guarded routes
404event_not_foundSports
404odds_not_foundSports
404game_not_foundCasino
404player_not_foundWallet
404wallet_transaction_not_foundWallet

Wallet conflicts and idempotency

The ledger refused the operation. Repeating a pending or conflicting key does not start a second provider call.

HTTPerrorSurface
409insufficient_balanceWallet
409wallet_idempotency_conflictWallet
409wallet_transaction_pendingWallet
409wallet_already_rolled_backWallet
409wallet_transaction_not_reversibleWallet

Rate limits

Sports routes share one per-client window. Honour Retry-After. Casino routes do not consume that limiter and do not return rate_limited.

HTTPerrorSurface
429rate_limitedSports

Upstream

The service could not use a stored payload or the game provider rejected the call.

HTTPerrorSurface
500internal_errorAll routes
502malformed_upstream_dataSports
502launch_authentication_failedCasino
502launch_failedCasino
502wallet_provider_failedWallet

Availability

Retry later with the same request. A wallet timeout is the exception: the row stays pending.

HTTPerrorSurface
503security_config_unavailableSports and Casino
503catalog_unavailableSports
503redis_unavailableSports and Casino
503casino_catalog_unavailableCasino
503launch_not_configuredCasino
503player_store_unavailableCasino
503wallet_not_configuredWallet
503wallet_store_unavailableWallet
504redis_timeoutSports
504launch_unavailableCasino
504wallet_provider_timeoutWallet

Retries

ResponseWhat to do
400Fix the request. Do not retry it unchanged.
403 ip_not_allowedConfirm the API key and the server public IP. Do not guess which check failed.
429 rate_limitedWait the Retry-After seconds. Sports routes only.
409 insufficient_balanceDo not retry until the balance can cover the amount.
409 wallet_idempotency_conflictDo not change the body under that transaction_id.
409 wallet_transaction_pending or 504 wallet_provider_timeoutDo not send a new transaction_id for the same bet. Repeating the original key reports that it is still pending.
502 wallet_provider_failedThe operation was rejected. Repeating the same key returns that failure. A new business attempt needs a new transaction_id.
504 launch_unavailableSafe to retry the same launch. Launch does not move the wallet.
503 catalog or store errorsRetry later with the same request.