> Documentation index: [Saleor](/llms.txt) · [This section](/developer/llms.txt)
> Source: https://docs.saleor.io/developer/app-store/apps/np-atobarai/errors

# NP Atobarai App Errors

<a id="error-handling"></a>

## Error handling

There may be a number of reasons why an error occurs during the payment process.

-   Expected errors: e.g., customer provided wrong contact details
-   App configurations errors: like provided keys are incorrect
-   NP Atobarai errors: NP Atobarai API can be down or return unexpected errors
-   Integration errors: storefront doesn't provide proper data to mutations
-   Saleor errors: Saleor may bo down or return unexpected errors

App is doing its best to detect each class of errors to give the best possible message to the integrator/staff.

There are two types of messages the app is setting at the moment:

1.  TransactionEvent.message field - especially when the app is setting "FAILURE"-like events, it can return also a message why it happened
2.  `data` errors - errors especially valuable for storefront to debug (reading a message in the network response) or handle errors (reading and translating error codes)

<a id="errors-in-payment-gateway-mutation-data"></a>

## Errors in payment gateway mutation `data`

Errors that come from payment gateway `data` field will **always** have the following structure:

```json
{
  "errors": [
    // It will be array of errors, in case of multiple errors were caught
    {
      "code": "WrongPhoneNumberFormatError", // This code can be used to react on the cause
      "message": "Phone number format is incorrect - it should start with +81" // This message CAN change and should be used for debugging
    }
  ]
}
```

Due to a fact that both `TransactionEvent.message` and `data` are public fields available on the storefront, app will not return details due to security reasons.

<a id="reporting-fulfillment-errors"></a>

## Reporting fulfillment errors

When handling reporting fulfillment (in `trackingNumberUpdated` webhook), the app will report errors as order notes.

The app also adds order notes when fulfillment reporting is skipped due to transaction validation issues:

-   **No completed transactions** — _"NP Atobarai skipped fulfillment reporting: No completed transactions found for the order"_. This can happen when the order has only "ghost" transactions (e.g. failed payment attempts).
-   **Multiple completed transactions** — _"NP Atobarai skipped fulfillment reporting: Multiple completed transactions found for the order"_. The app supports only a single completed transaction per order.
