# Error Handling

It is expected that your application has a robust error-handling process in place. An error response should contain a short description of the error to assist our Support teams in troubleshooting.

**Retry behaviour for failed reservation deliveries**

When SMX receives an Error response from your application after attempting to deliver a reservation:

* SMX retries the same reservation delivery every 30 seconds.
* A maximum of 3 delivery attempts are made.
* After the third failed attempt, the delivery times out and the reservation is marked as failed.

If the reservation still needs to be delivered after this point, the SiteMinder Exchange (SMX) Support team must manually flush and resend the reservation.

{% hint style="warning" %}
Error Responses using the `<Errors> </Errors>` tag will flag the reservation delivery from SMX to your endpoint as `Failed`.
{% endhint %}

## **Error Responses**

{% hint style="info" %}
HTTP Status should be **200 OK**.
{% endhint %}

### **Invalid Hotel Code**

```xml
<SOAP-ENV:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
        <OTA_HotelResNotifRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2025-08-01T09:30:47+08:00" EchoToken="abc123-unique">
          <Errors>
            <Error Type="6" Code="392">Hotel not found for HotelCode=XXXXXX</Error>
          </Errors>
        </OTA_HotelResNotifRS>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

### **Invalid Username or Password**

```xml
<SOAP-ENV:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">       
       <OTA_HotelResNotifRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2025-08-01T09:30:47+08:00" EchoToken="abc123-unique">
          <Errors>
             <Error Type="6" Code="497">Invalid Username and/or Password</Error>
         </Errors>
       </OTA_HotelResNotifRS>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

### Warning Responses <a href="#warning-responses-to-smx" id="warning-responses-to-smx"></a>

{% hint style="info" %}
HTTP Status should be **200 OK**.
{% endhint %}

Any other warning responses that are not application or server-level issues should be sent as **Success + Warning** to avoid reservation delivery failures.

Our Reservations API specifications will have non-mandatory fields/attributes that a Publisher might not send in the reservation XML if it's not supported by them. Publishers should always send the mandatory reservation fields. Review our [Reservations](/smx-api/reference/reservations.md) to view the mandatory and non-mandatory attributes.

#### **Required Information Not Present - Missing email address**

{% code expandable="true" %}

```xml
<SOAP-ENV:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">       
       <OTA_HotelResNotifRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2025-08-01T09:30:47+08:00" EchoToken="abc123-unique">
			<Success/>
			<Warnings>
				<Warning Type="10" Code="321">Guest email address is required</Warning>
			</Warnings>
			<HotelReservations>
				<HotelReservation>
					<UniqueID ID="LH123456789"/>
					<ResGlobalInfo>
						<HotelReservationIDs>
							<HotelReservationID ResID_Type="10" ResID_Value="LH123456789"/>
						</HotelReservationIDs>
					</ResGlobalInfo>
				</HotelReservation>
			</HotelReservations>          
       </OTA_HotelResNotifRS>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

{% endcode %}

#### **Required Information Not Present - Missing phone number**

{% code expandable="true" %}

```xml
<SOAP-ENV:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">       
       <OTA_HotelResNotifRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2025-08-01T09:30:47+08:00" EchoToken="abc123-unique">
			<Success/>
			<Warnings>
				<Warning Type="10" Code="316">Phone number is required</Warning>
			</Warnings>
			<HotelReservations>
				<HotelReservation>
					<UniqueID ID="LH123456789"/>
					<ResGlobalInfo>
						<HotelReservationIDs>
							<HotelReservationID ResID_Type="10" ResID_Value="LH123456789"/>
						</HotelReservationIDs>
					</ResGlobalInfo>
				</HotelReservation>
			</HotelReservations>          
       </OTA_HotelResNotifRS>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

{% endcode %}

***

## Recommended OTA Error Codes <a href="#recommended-ota-error-codes" id="recommended-ota-error-codes"></a>

SiteMinders recommends the following error codes to be used: [Error Warning Types (EWT)](/smx-api/additional-resources/reference-tables/error-warning-types.md)and [Error Codes (ERR)](/smx-api/additional-resources/reference-tables/error-codes.md)

## SOAP Faults <a href="#soap-faults" id="soap-faults"></a>

Generally, OTA messages transmit "business logic" failures in the `<Errors>` element structure. However, a SOAP fault can be returned in case of an unexpected error caused by for example a SOAP message where the `XML` cannot be parsed. The SOAP Fault will identify the party at fault (CLIENT/SERVER).

```xml
<SOAP-ENV:Envelope
	xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
	<SOAP-ENV:Header/>
	<SOAP-ENV:Body>
		<SOAP-ENV:Fault>
			<faultcode>SOAP-ENV:Client</faultcode>
			<faultstring xml:lang="en">Authentication failed - Invalid username</faultstring>
		</SOAP-ENV:Fault>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

{% 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/smx-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.
