Errors

Handle TRUXX HUB API failures consistently.

TRUXX HUB returns structured error responses so your integration can detect authentication failures, validation issues, missing resources, and operational limits in a consistent way.

Error response format
{
  "success": false,
  "code": 400,
  "message": "Bad Request",
  "data": {
    "Error": "Body is required."
  }
}

Common response shape

successfalse for failed requests.
codeThe HTTP status code returned by the API.
messageA short summary of the error result.
data.ErrorThe detailed error message your integration should log or handle.

Status codes

400 Bad RequestMissing or invalid request data.
401 UnauthorizedAuthentication failed or the API user could not be resolved.
403 ForbiddenEnvironment or host mismatch for the provided API key.
404 Not FoundThe requested trip or pricing result was not found.
429 Too Many RequestsThe request exceeded endpoint rate limits.
500 Internal Server ErrorAn unexpected server-side failure occurred.

Authorization errors

API key is requiredThe request did not include a usable x-api-key header value.
Invalid API keyThe provided key is not valid.
API key is inactiveThe key exists but is currently disabled.
API key is revokedThe key has been revoked and must be replaced.
Invalid host for API keyThe key environment does not match the target host.
Invalid API user.The authenticated account could not be resolved to a usable API user.

Validation errors

Body is required.The request body was missing for a body-based endpoint.
tripId is required.The cancel-trip request did not include a valid trip identifier.
Missing required fields...One or more required request properties were not provided.
invalid vehicle typeThe selected vehicle type is not available for TRUXX HUB.
Invalid mobile numberThe mobile number format is not accepted.

Wallet and billing errors

Wallet not foundNo active wallet exists for the authenticated account.
Insufficient wallet balanceThe wallet does not have enough balance for protected operations.
Wallet balance is already negativeThe wallet must be topped up before creating a new trip.
Balance will become less than -500 AEDThe wallet must be topped up or auto recharge enabled before proceeding.

Trip operation errors

No estimated price was returned.The platform could not calculate a fare for the request.
Trip not foundThe requested trip does not exist for the authenticated account.
Failed to create tripThe trip request could not be completed successfully.
Pickup location is outside the UAEThe pickup coordinates are outside the supported service area.
Destination is outside the UAEThe destination coordinates are outside the supported service area.