Error Codes
Overview
When a Vendor receives an API request from ONDA Hub and encounters a processing failure or business logic error, it must respond using the standard error response format.
ONDA receives the vendor's error response and classifies it into standard error codes based on the code field, then reflects the result in the reservation processing.
Error Response Format
Vendors must respond with errors in the following JSON format.
{
"code": "4000",
"error": "No rooms available for booking"
}
| Field | Type | Required | Description |
|---|---|---|---|
code | string | Required | Numeric error code from the list below (e.g. "4000") |
error | string | Required | English error message defined in the list below |
Error Code List
SYSTEM_ERROR
| code | error | HTTP | Description |
|---|---|---|---|
1000 | An error occurred during system processing | 500 | An error occurred during system processing |
AUTH_ERROR
| code | error | HTTP | Description |
|---|---|---|---|
2000 | Access denied | 403 | Access to the resource is denied |
VALIDATION_ERROR
| code | error | HTTP | Description |
|---|---|---|---|
3000 | Please check your input information | 400 | One or more input fields are invalid |
BUSINESS_ERROR
Most Critical Error Codes
BUSINESS_ERROR codes cover the core failures that occur during reservation creation, confirmation, cancellation, and lookup. Vendors must return the exact code that matches the situation. Incorrect or missing codes will prevent ONDA from processing reservations correctly.
| code | error | HTTP | Description |
|---|---|---|---|
4000 | No rooms available for booking | 409 | No available rooms for the requested dates (Create Reservation) |
4001 | Requested amount differs from actual amount | 409 | The amount sent by ONDA does not match the actual price (Create Reservation) |
4002 | Minimum guest requirement not met | 409 | The number of guests is below the minimum required (Create Reservation) |
4003 | Maximum guest capacity exceeded | 409 | The number of guests exceeds the maximum capacity (Create Reservation) |
4004 | Reservation not found | 404 | No reservation exists for the given identifier (Check Reservation) |
4005 | Reservation already cancelled | 409 | The reservation has already been cancelled (Cancel Reservation) |
4006 | Reservation cannot be cancelled | 409 | The reservation is in a state that does not allow cancellation (Cancel Reservation) |
4007 | Reservation cannot be confirmed | 409 | The reservation is in a state that does not allow confirmation (Confirm Reservation) |
UNKNOWN_ERROR
| code | error | HTTP | Description |
|---|---|---|---|
9999 | An unknown error occurred | 500 | An unclassified or unexpected error occurred |
Notes
codefield takes priority: When thecodefield is included, ONDA uses it with priority. Ifcodeis absent or contains an unrecognized value, ONDA classifies the error by pattern-matching theerrormessage.errorfield must use the English messages defined in the list above. Using arbitrary strings may cause ONDA to misclassify the error.- Undefined codes: If a code not listed above is included, ONDA classifies the error based on the HTTP status code or processes it as
9999 (UNKNOWN_ERROR).