# Exception Handling

### Overview

The Exception Module is responsible for capturing, classifying, and managing anomalies detected during the reconciliation process. This module ensures that no transaction is lost and that financial data integrity is maintained between the internal data (Left Side) and the external partner/gateway (Right Side).

### Exception Classifications

Exceptions are categorized into two distinct types based on the presence of counterpart data and the result of the matching logic.

#### Type A: Mismatched (Data Integrity)

* **Definition:** Records exist on both sides, and the system has attempted reconciliation. However, the comparison logic failed because key attributes do not match.
* **Reconciliation Status:** `MISMATCHED`
* **Business Context:** This represents a data integrity error requiring investigation (e.g., amount discrepancies, status discrepancies, or metadata corruption).

#### Type B: Expected (Timing/Availability)

* **Definition:** These are one-sided transactions. The system has a record on one side (e.g., Internal Ledger), but the corresponding record on the other side (e.g., Bank Statement) has not arrived yet.
* **Reconciliation Status:** `EXPECTED`
* **Business Context:** This is often a temporary state caused by processing latency, batch cut-off times, or network delays.


---

# 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.hyperswitch.io/other-features/payments-modules/reconciliation-product/exception-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.
