100HP
  1. FAQ
100HP
  • 100HP API for partners v2.9.1
    • General
      • Overview
      • FAQ
        • Rollback and billing resolver general flow
        • HTTP status codes and custom error codes
        • IP Whitelisting
    • Integration
      • Preparation for integration
      • General API provision
    • 100HP Gaming API
      • Game list
      • Launch game url
      • Video replay
    • 100HP Game flow API
      • Player authorization
      • Get balance
      • Withdrawal money
      • Deposit money
      • Rollback money
    • Implementation Guide
      • YourCasino.js
      • Casino.js
      • TestCasino.js
      • DDL-example
        • mongodb.js
        • mysql.js
        • postgres.js
    • Testing
      • Automated Test Service
    • API INFO
      • API Changelog
  1. FAQ

HTTP status codes and custom error codes

When integrating with our API, it is important to return the correct errCode, which is used as the HTTP status code in our system.
You can implement error mapping in your middleware:
Internally, you may use your own error codes that are convenient for your system.
At the middleware level, map your internal errors to the custom error codes defined in our documentation.
Suppose your system returns a standard HTTP error:
{
  "status": 403,
  "message": "Invalid argument"
}
You can map it in the response to us as:
{
  "errCode": 601,
  "message": "Invalid argument"
}
This approach is straightforward and a common practice in game integrations.
Example of the response (in the logs):
{
  "level": "ERROR",
  "ts": "2025-11-12T10:37:32.223Z",
  "caller": "logger/logger.go:131",
  "msg": "Auth - SendRequest: sendRequest - internal response: URL: https://example/auth, StatusCode: 702, Response {\"data\":\"\",\"errCode\":702,\"message\":\"Internal wallet error\"}",
  "sessionId": "sessionId",
  "request_id": "request_id",
  "stacktrace": "stacktrace"
}
Note:
Always ensure that your middleware maps internal errors to our errCode values before sending the response to our API.
Modified at 2026-01-26 14:56:02
Previous
Rollback and billing resolver general flow
Next
IP Whitelisting
Built with