# Error Types

## API Errors

(Stated in headers): [In API Guide](https://docs.covergenius.com/xcover/responses), global environment based\
\
Basic approach:\
“Does the API respond with a 20X response?”\
\
Useful for:\
\- General API function\
\- Confirmation of actions\
\- Basic operation validation

Example of use:\
\- Was a quote request received?\
\- Was a booking request received?\
\- Was there any full failures

## Logic Errors

Logic errors are present in API response body, are case by case, and policy based.\
They are often the indicator of a problem with the booking or quote, and may represent a partial booking failure. Always look for the "`errors`" array.\
\
Basic approach:\
“Does the request contain any content concerns, or logical failures?”\
\
Useful for:\
\- Calculation issues\
\- Confirmation over various state actions\
(does a booking match a quote expectation)\
\- In depth rule validation\
\
Example of use:\
\- Was a quote request valid?\
\- Was a booking request complete, were there any partial failures?

\
Logic error management:

1. All quotes in a quote or booking request should be confirmed individually (not just package, or package status).\
   An erroneous quote will return a "null" response for the object.\
   \
   Example:&#x20;

   <figure><img src="/files/I2vkmNRRw2zKfrlAOV8j" alt=""><figcaption><p>a quote request and components of the response</p></figcaption></figure>

2. Booking request items should be confirmed similarly\
   \
   \
   Example, basic elements present, first quote id sent also present&#x20;

   <figure><img src="/files/DaRAkk009WZp4iAs9Wxu" alt=""><figcaption><p>A booking request and part of the response</p></figcaption></figure>

3. Booking request shouldn't have errors, mismatched values, or null quote responses

In the below example, the booking was successful, but partially failed due to a component quote having a logic error.

<figure><img src="/files/jgAT8twEE9aiMf7vyb3l" alt=""><figcaption><p>A booking response showing package section, and a quote response component missing from the package total, with error</p></figcaption></figure>

4. A null quote component will result in a differing value for the policy bundle, even in a confirmed state. &#x20;

<figure><img src="/files/a3CdmJ9uSHp1Tk2Bo6Ve" alt=""><figcaption><p>Part of a booking request and response, showing the first quote in response does not match the first in request.</p></figcaption></figure>

Understanding and monitoring for these response variations and errors will greatly reduce misalinged bookings and improve customer satisfaction.&#x20;


---

# 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://docs.covergenius.com/xcover/responses/error-types.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.
