The Bet Brothers
HomeNewsLinkedIn
  • The Bet Brothers APIS
    • 🧩Core Concepts
    • 🔁API Flow
  • OPERATOR API
    • 🔗Operator Integration Service
    • 🔑Protocol API
      • Create api-token
      • Revoke api-token
  • 🚀Game Launcher API
    • Get Game Providers
    • Get Games
    • Launch Game in Demo Mode
    • Launch game in Real Mode
  • 💰Wallet API
    • Balance
    • Bet
    • Win
    • Refund
    • Rollback Win
  • ⚡Free Spin API
    • Add Free Spin
    • Cancel Free Spin
  • 🎮Game Insights
    • Get Game Bet Levels
    • Get Round Info
  • 📖Addendum
    • TBB Error Codes
    • Wallet Error Response
  • SUPPLIER API
    • 🔗Supplier Integration Service
    • 🔑Supplier Protocol API
    • 🚀Game Launcher API
      • Launch Game in Demo Mode
      • Launch Game in Real Mode
  • 🎲Game Events
    • Balance
    • Bet
    • Win
    • Refund
  • 📖Addendum
    • TBB Error Codes
Powered by GitBook
On this page
  1. Addendum

TBB Error Codes

When an error occurs while processing a request on The Bet Brothers Platform, the platform responds with an HTTP error code and a detailed JSON object that describes the specific error encountered. This error object can have different structures depending on the nature of the error.

Example Error Response Structures

1. Errors Containing a Field-Specific Message

In some cases, the errors field might contain specific fields (such as ip_address), each with its own array of error messages. This structure is used when multiple validation errors need to be reported, particularly for different fields within the request.

{
    "status": "error",
    "errors": {
        "ip_address": [
            "The ip address field is required unless demo is true."
        ]
    }
}
  • Explanation: In this case, the error message is related to the ip_address field. The response indicates that the ip_address field is missing, which is required unless the demo flag is set to true. The errors object provides a key for the specific field (ip_address), and the array under it lists all the error messages related to that field.

  • Usage: This format is helpful when different fields in the request might have their own validation rules or when there are multiple issues that need to be addressed. Each field that has an issue will have its own entry in the errors object with the corresponding error messages.

2. Errors Containing a General Error Message

In other cases, the errors field might simply contain a list of general error messages without being tied to a specific field in the request. This format is typically used for higher-level errors or issues that don't relate to a particular input field.

{
    "status": "error",
    "errors": [
        "Campaign not found"
    ]
}
  • Explanation: In this example, the error message is not related to a specific field, but rather an overarching issue with the request. The message indicates that a particular campaign could not be found. This type of error is more general and does not refer to a specific field, but rather an issue with the request as a whole.

  • Usage: This format is often used when a resource, such as a campaign, game, or player, cannot be found or does not exist, making it unnecessary to specify which field in the request caused the issue.

PreviousAddendumNextWallet Error Response

Last updated 10 days ago

📖