Skip to main content

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"
}
FieldTypeRequiredDescription
codestringRequiredNumeric error code from the list below (e.g. "4000")
errorstringRequiredEnglish error message defined in the list below

Error Code List

SYSTEM_ERROR

codeerrorHTTPDescription
1000An error occurred during system processing500An error occurred during system processing

AUTH_ERROR

codeerrorHTTPDescription
2000Access denied403Access to the resource is denied

VALIDATION_ERROR

codeerrorHTTPDescription
3000Please check your input information400One 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.

codeerrorHTTPDescription
4000No rooms available for booking409No available rooms for the requested dates (Create Reservation)
4001Requested amount differs from actual amount409The amount sent by ONDA does not match the actual price (Create Reservation)
4002Minimum guest requirement not met409The number of guests is below the minimum required (Create Reservation)
4003Maximum guest capacity exceeded409The number of guests exceeds the maximum capacity (Create Reservation)
4004Reservation not found404No reservation exists for the given identifier (Check Reservation)
4005Reservation already cancelled409The reservation has already been cancelled (Cancel Reservation)
4006Reservation cannot be cancelled409The reservation is in a state that does not allow cancellation (Cancel Reservation)
4007Reservation cannot be confirmed409The reservation is in a state that does not allow confirmation (Confirm Reservation)

UNKNOWN_ERROR

codeerrorHTTPDescription
9999An unknown error occurred500An unclassified or unexpected error occurred

Notes

  • code field takes priority: When the code field is included, ONDA uses it with priority. If code is absent or contains an unrecognized value, ONDA classifies the error by pattern-matching the error message.
  • error field 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).