Error Codes

Response Codes

Room Mapping uses conventional HTTP response codes to indicate the success or failure of an API request. In general:

  • Codes in the 200 OK range indicate success.
  • Codes in the 400 Bad Request, 401 Unauthorized, 403 Forbidden indicate an error that failed given the information provided.
  • Codes in the 500 Internal Server Error range indicate an error within our servers however these are rare.

👍

Graceful Exception Handling

Our libraries raise exceptions for many reasons, such as parameters issues, authentication errors, and network unavailability.

We recommend writing code that gracefully handles all possible API exceptions.

HTTP Response Codes

Other standard HTTP errors may be generated by our stack and not directly from our API. Here are the categories of possible Standard HTTP response codes.

CodeExplnationType
1xxCommunication transfer protocol-level information.Informational
2xxThis indicates that the client's request was accepted successfully.Success
3xxIndicates that the client must take some additional action to complete their request.Redirection
4xxThis category of error status codes points to the clients.Client Error
5xxThis category of error is related to server exceptions due to internal incapability to perform the request. The user is advised to contact the Room Mapping API Support team.Server Code

Error Response Body - Any response code within the 4xx or 5xx range will have a static response object alongside a relevant error message to aid the developer.

Error Codes

Besides the generic HTTP response codes, there are some room mapping specific errors to provide clarification over the 400 response.

Here are the details :

Error CodeError
E4001Mandatory fields for hotel recognition are missing.
E4002Hotel is not recognized.
E4010More than {maxRatesCount} rates in one request
E4020Room data does not contain a mandatory field. Each rate must include one of [RoomKey, RoomName, RateDescription].