# Error Handling

## Responses to SiteMinder <a href="#error-responses-to-siteconnect" id="error-responses-to-siteconnect"></a>

Errors must be returned within a 'SOAP Envelope' and use the defined response message container depending on the message being responded to. See the relevant parts of our specification within the [Rooms and Rates](/siteconnect-api/reference/rooms-and-rates.md), [Availability and Restrictions](/siteconnect-api/reference/availability-and-restrictions.md) and [Rates](/siteconnect-api/reference/rates.md) sections for more information about each error response message.

If the error is specifically related to **application-level** errors, **do not** respond with any other error types (HTTP, etc.). If you have **server-level** issues, then it is OK to respond with HTTP standard error codes.

It is expected that your booking channel has a robust error handling process in place. This includes a queuing mechanism and a robust retry strategy.

An error response must contain a short error description to assist our Support teams.

### Sample Error Response

```xml
<SOAP-ENV:Envelope
	xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
	<SOAP-ENV:Header/>
	<SOAP-ENV:Body>
		<OTA_HotelAvailNotifRS
			xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="9a40291f-24fa-410d-b1c2-b64efab47da4" TimeStamp="2023-04-28T20:46:53+10:00" Version="1.0">
			<Errors>
				<Error Type="6" Code="392">Hotel not found for HotelCode=XXXXXX</Error>
			</Errors>
		</OTA_HotelAvailNotifRS>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

### Mandatory Error Responses

Building these errors are required. The error descriptions must be the same as shown below.

{% tabs %}
{% tab title="Credentials" %}

```xml
<OTA_HotelAvailRS
	xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="9a40291f-24fa-410d-b1c2-b64efab47da4" TimeStamp="2023-04-28T20:46:53+10:00" Version="1.0">
	<Errors>
		<Error Type="4" Code="448">Invalid Username and/or Password</Error>
	</Errors>
</OTA_HotelAvailRS>
```

{% endtab %}

{% tab title="Hotel Code" %}

```xml
<OTA_HotelAvailRS
	xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="9a40291f-24fa-410d-b1c2-b64efab47da4" TimeStamp="2023-04-28T20:46:53+10:00" Version="1.0">
	<Errors>
		<Error Type="6" Code="392">Hotel not found for HotelCode=XXXXXX</Error>
	</Errors>
</OTA_HotelAvailRS>
```

{% endtab %}

{% tab title="Room Code" %}

```xml
<OTA_HotelAvailNotifRS
	xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="9a40291f-24fa-410d-b1c2-b64efab47da4" TimeStamp="2023-04-28T20:46:53+10:00" Version="1.0">
	<Errors>
		<Error Type="12" Code="402">Room type code not found for this hotel</Error>
	</Errors>
</OTA_HotelAvailNotifRS>
```

{% endtab %}

{% tab title="Rate Code" %}

```xml
<OTA_HotelAvailNotifRS
	xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="9a40291f-24fa-410d-b1c2-b64efab47da4" TimeStamp="2023-04-28T20:46:53+10:00" Version="1.0">
	<Errors>
		<Error Type="12" Code="249">Rate code not found for this hotel</Error>
	</Errors>
</OTA_HotelAvailNotifRS>
```

{% endtab %}
{% endtabs %}

| Error Description                       | Mandatory                                                                                                                      |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Invalid Username and/or Password        | <p><code>OTA\_HotelAvailRS</code></p><p><code>OTA\_HotelAvailNotifRS</code></p><p><code>OTA\_HotelRateAmountNotifRS</code></p> |
| Hotel not found for HotelCode=XXXXXX    | <p><code>OTA\_HotelAvailRS</code></p><p><code>OTA\_HotelAvailNotifRS</code></p><p><code>OTA\_HotelRateAmountNotifRS</code></p> |
| Room type code not found for this hotel | <p><code>OTA\_HotelAvailNotifRS</code></p><p><code>OTA\_HotelRateAmountNotifRS</code></p>                                      |
| Rate code not found for this hotel      | <p><code>OTA\_HotelAvailNotifRS</code></p><p><code>OTA\_HotelRateAmountNotifRS</code></p>                                      |

**Invalid included occupancy**

{% code title="Required for PDP" %}

```xml
<OTA_HotelRateAmountNotifRS
	xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="9a40291f-24fa-410d-b1c2-b64efab47da4" TimeStamp="2023-04-28T20:46:53+10:00" Version="1.0">
	<Errors>
		<Error Type="12" Code="137">Invalid included occupancy</Error>
	</Errors>
</OTA_HotelRateAmountNotifRS>
```

{% endcode %}

{% hint style="info" %}
**Optional:** the error `Invalid included occupancy` can be combined with `expecting N` (e.g. `Invalid included occupancy: expecting 2`). This provides more detailed information about the correct value that need to be configured in the room rate mapping.
{% endhint %}

**Invalid number of adults**

This error will validate against the # of `BaseByGuestAmt` nodes received in the `OTA_HotelRateAmountNotifRQ`. If you have set the Max Occupancy to 5, then you must expect **5** `BaseByGuestAmt` indicating the price per pax. If you receive **more** or **less,** then the error `Invalid number of adults` must be sent to alert the hotelier to check the Max Occupancy setting in SiteMinder. `BaseByGuestAmt` nodes must match the Max Occupancy value for that room rate combo.

{% code title="Required for OBP" %}

```xml
<OTA_HotelRateAmountNotifRS
	xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="9a40291f-24fa-410d-b1c2-b64efab47da4" TimeStamp="2023-04-28T20:46:53+10:00" Version="1.0">
	<Errors>
		<Error Type="12" Code="397">Invalid number of adults</Error>
	</Errors>
</OTA_HotelRateAmountNotifRS>
```

{% endcode %}

{% hint style="info" %}
**Optional:** the error `Invalid number of adults` can be combined with `expecting N` (e.g. `Invalid number of adults: expecting 5`). This provides more detailed information about the correct value that need to be configured in the room rate mapping.
{% endhint %}

### Auto-Disable Mechanism

To ensure data accuracy and system integrity, our error handling includes an auto-disabling mechanism that temporarily disconnects a property or specific rooms and rates when certain errors are returned after pushing availability, restriction, or rate updates.

For instance, if an error like `Hotel not found for HotelCode` is detected in your [OTA\_HotelAvailNotifRS](https://developer.siteminder.com/siteminder-apis/channels/introduction/siteconnect/api-reference/availability-and-restrictions#response) or [OTA\_HotelRateAmountNotifRS](https://developer.siteminder.com/siteminder-apis/channels/introduction/siteconnect/api-reference/rates#response), the entire property connection is disabled. In cases where errors such as `Room type code not found for this hotel`, `Rate code not found for this hotel`, `Invalid included occupancy`, or `Invalid number of adults` occur, only the affected rooms or rates are disabled.

Once disabled, the system stops retrying the connection indefinitely and sends an email notification to the property with details about the action taken, the error encountered, and steps for resolution. Inform us If your booking channel requires additional error responses to trigger this mechanism

{% hint style="success" %}
This mechanism relies on the error descriptions to function correctly. Ensure that the descriptions used match those listed above. Error messages are case-sensitive.
{% endhint %}

## Responses from SiteMinder <a href="#error-responses-from-siteconnect" id="error-responses-from-siteconnect"></a>

Your system should have a strong error handling process that can queue and resend reservation requests.

Ensure that your system waits for a response from SiteMinder before sending additional reservation requests for the same site. Set an appropriate timeout duration, **between 60 and 120 seconds**, to allow requests to complete before retrying. This prevents unnecessary retries and ensures smooth communication.

If the response contains an OTA message with an **'Error'** element, then the reservation cannot be processed because some data is invalid. See below [Common Error Responses](#common-error-responses). The reservation request message will not process until the **error** is fixed.\
In this case, do not retry sending the reservation request until the issue in the payload is fixed. Remove the request from the queue.

### Sample Error Response

```xml
<SOAP-ENV:Envelope
	xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
	<SOAP-ENV:Header/>
	<SOAP-ENV:Body>
		<OTA_HotelResNotifRS
			xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="8c836193-ef3d-43b9-835a-19f8ffa7282a" TimeStamp="2023-04-28T10:35:29+00:00" Version="1.0">
			<Errors>
				<Error Type="10">Node CreateDateTime must exist</Error>
			</Errors>
		</OTA_HotelResNotifRS>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

### Common Error Responses

{% tabs %}
{% tab title="Credentials" %}

<pre class="language-xml"><code class="lang-xml">&#x3C;OTA_HotelResNotifRS
<strong>	xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="9a40291f-24fa-410d-b1c2-b64efab47da4" TimeStamp="2023-04-28T20:46:53+10:00" Version="1.0">
</strong>	&#x3C;Errors>
		&#x3C;Error Type="4">Invalid Username and/or Password for ABC&#x3C;/Error>
	&#x3C;/Errors>
&#x3C;/OTA_HotelResNotifRS>
</code></pre>

Check that the correct username/password is sent in the request.
{% endtab %}

{% tab title="Incorrect Hotel Code" %}

```xml
<OTA_HotelResNotifRS
	xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="9a40291f-24fa-410d-b1c2-b64efab47da4" TimeStamp="2023-04-28T20:46:53+10:00" Version="1.0">
	<Errors>
		<Error Type="6">Hotel not found for HotelCode=XXXXXX</Error>
	</Errors>
</OTA_HotelResNotifRS>
```

1. Contact the hotel to make sure they have the correct hotel code configured in SiteMinder.
2. In some cases, you will receive this error if using the incorrect region reservation endpoint. Please review **Region-Dependent Reservation Delivery** under [API Reference](/siteconnect-api/guides/api-overview.md#reservations).
   {% endtab %}

{% tab title="No Hotel Code" %}

```xml
<OTA_HotelResNotifRS
	xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="9a40291f-24fa-410d-b1c2-b64efab47da4" TimeStamp="2023-04-28T20:46:53+10:00" Version="1.0">
	<Errors>
		<Error Type="6">No HotelCodes were found in the message payload. Authorisation cannot proceed.</Error>
	</Errors>
</OTA_HotelResNotifRS>
```

Check your reservation request. `<BasicPropertyInfo HotelCode="HOTELCODE" HotelName="The Hotel Name"/>` must be present.
{% endtab %}

{% tab title="Node Must Exist" %}

```xml
<OTA_HotelResNotifRS
	xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="9a40291f-24fa-410d-b1c2-b64efab47da4" TimeStamp="2023-04-28T20:46:53+10:00" Version="1.0">
	<Errors>
		<Error Type="10">Node CreateDateTime must exist</Error>
	</Errors>
</OTA_HotelResNotifRS>
```

Your reservation request must be adjusted to send the required data.\
This applies to any other required element or attributes that are missing in the XML.
{% endtab %}
{% endtabs %}

### HTTP Error Handling

#### 4xx – Client Errors

4xx errors indicate that the request sent to SiteMinder is invalid. **These errors should not be retried, as resending the same message will continue to fail**. The partner must correct the payload, structure, or authentication details before attempting to send the request again. For a complete list of common 4xx errors and how to address them, refer to the [HTTP Error Handling](/siteconnect-api/additional-resources/reference-tables/http-error-handling.md) page.

#### 5xx – Server Errors

5xx errors indicate a temporary issue on the server or an upstream dependency. **These errors are usually recoverable, and partners are expected to implement a retry strategy**. We recommend an exponential backoff approach (5s → 10s → 20s → 40s → then every 1 minute) until a minimum timeout of 30 minutes is reached. If delivery still fails after the retry period, please contact SiteMinder’s Application Operations team. More information on common 5xx responses is available in the [HTTP Error Handling](/siteconnect-api/additional-resources/reference-tables/http-error-handling.md) page.

{% hint style="success" icon="sparkles" %}

## Still have questions?

Use the <i class="fa-gitbook-assistant">:gitbook-assistant:</i> **Ask** button at the top of the page to chat with our AI assistant — it can help you navigate the guide, understand requirements, and troubleshoot issues.

If you need more support, visit [Integration Support](/integration-support/integration-support.md).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.siteminder.com/siteconnect-api/guides/error-handling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
