# Error Handling

Your PMS/RMS should have a strong error handling system that can queue and resend errors. Additionally, you need to inform hoteliers about any errors that impact the synchronization of their data through pmsXchange.

Ensure that your system waits for a response from SiteMinder before sending additional 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.

### Application Level

If the response from SiteMinder contains an OTA RS message with an 'Error' element, it indicates that the update cannot be processed due to invalid data. Here are some common application-level error scenarios:

{% tabs %}
{% tab title="Missing element/attribute" %}
**Missing Required Elements or Attributes**: Adjust your implementation to ensure all required data is sent.

```xml
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <OTA_HotelAvailNotifRS Version="1.0" TimeStamp="2025-10-25T01:32:55+00:00" EchoToken="TEST9BA23FF4-2EE4-11EF-2426-09173F13E4C5" xmlns="http://www.opentravel.org/OTA/2003/05">
         <Errors>
            <Error Type="10">The content of element "AvailStatusMessages" is not complete. One of "AvailStatusMessage" is expected</Error>
         </Errors>
      </OTA_HotelAvailNotifRS>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

```xml
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <OTA_HotelAvailNotifRS Version="1.0" TimeStamp="2025-10-25T01:33:55+00:00" EchoToken="TEST9BA23FF4-2EE4-11EF-2426-09173F13E4C5" xmlns="http://www.opentravel.org/OTA/2003/05">
         <Errors>
            <Error Type="3" Code="450">The HotelCode length must be equal to or greater than 1</Error>
         </Errors>
      </OTA_HotelAvailNotifRS>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

{% endtab %}

{% tab title="Incorrect Credentials" %}
**Incorrect Credentials**: Verify that the correct username and password are set in your PMS/CRS/RMS. If you believe the details are accurate, confirm them with our PMS Support team.

```xml
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <OTA_HotelAvailNotifRS Version="1.0" TimeStamp="2025-10-25T01:29:05+00:00" EchoToken="TEST9BA23FF4-2EE4-11EF-2426-09173F13E4C5" xmlns="http://www.opentravel.org/OTA/2003/05">
         <Errors>
            <Error Type="4">Authentication failed - PMS received request with invalid username/password</Error>
         </Errors>
      </OTA_HotelAvailNotifRS>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

{% endtab %}

{% tab title="Invalid Hotel Code" %}
**Invalid Hotel Code**: Ensure the Hotel Code is entered correctly in your PMS. If you think the code is correct, contact our PMS Support team to verify it.

```xml
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <OTA_HotelAvailNotifRS Version="1.0" TimeStamp="2025-10-25T01:27:05+00:00" EchoToken="TEST9BA23FF4-2EE4-11EF-2426-09173F13E4C5" xmlns="http://www.opentravel.org/OTA/2003/05">
         <Errors>
            <Error Type="6">PMS is not authorized to access hotel with HotelCode=XXXXX</Error>
         </Errors>
      </OTA_HotelAvailNotifRS>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

{% endtab %}
{% endtabs %}

Below is an outline of the OTA (OpenTravel) standard EWT and ERR codes that will be used alongside the error messages specified in each pmsXchange API response.

{% tabs %}
{% tab title="OTA Error Warning Types" %}

<table><thead><tr><th width="84">EWT</th><th width="203">Error Type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>Unknown</td><td>Indicates an unknown error.</td></tr><tr><td>3</td><td>Biz rule</td><td>Indicates that the XML message has passed a low-level validation check, but that the business rules for the request message were not met.</td></tr><tr><td>4</td><td>Authentication</td><td>Indicates the message lacks adequate security credentials</td></tr><tr><td>6</td><td>Authorization</td><td>Indicates the message lacks adequate security credentials</td></tr><tr><td>10</td><td>Required field missing</td><td>Indicates that a required element or attribute, as defined by the schema or agreed upon by trading partners, is missing from the message. In the context of pmsXchange, this error will also be returned if the XML message does not conform to the data type restrictions specified by the XML schema.</td></tr><tr><td>12</td><td>Processing exception</td><td>Indicates that an undefined exception occurred during the processing of the request.</td></tr></tbody></table>
{% endtab %}

{% tab title="pmsXchange Error Descriptions" %}

<table><thead><tr><th width="210">Error Name</th><th>Error Description</th><th data-hidden></th></tr></thead><tbody><tr><td>Invalid Endpoint</td><td><code>Authentication failed - PMS does not exist</code></td><td></td></tr><tr><td>Invalid Requestor ID</td><td><code>Inconsistent PMS codes. PMS 'PMSCODE' does not match RequestorID 'PMSCODEX'</code></td><td></td></tr><tr><td>Invalid Credentials</td><td><code>Authentication failed - PMS received request with invalid username/password</code></td><td></td></tr><tr><td>Invalid Hotel Code</td><td><code>PMS is not authorized to access hotel with HotelCode=HOTELCODE</code></td><td></td></tr><tr><td>System error</td><td></td><td></td></tr><tr><td>Unable to process</td><td></td><td></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### Soap Faults

A SOAP fault can be returned in the event of an unexpected error, such as when the XML in a SOAP message cannot be parsed. The SOAP Fault will specify which party is at fault (CLIENT or SERVER).

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

```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">Invalid SOAP message</faultstring>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

{% endtab %}

{% tab title="Example" %}

```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">Namespace prefix s on Envelope is not defined</faultstring>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

{% 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](/pmsxchange-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](/pmsxchange-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/pmsxchange-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.
