Errors
When a payment fails, onError receives an Error. Failures from Uniport’s backend are normalized into a UniportError.
UniportError
A UniportError has a message, a stable code, and optionally details and the HTTP status. Timeouts, quote failures, deposit submission failures and status failures are all normalized before they reach your UI.
Codes
| code | When |
|---|---|
| VALIDATION_ERROR | A request was missing or had an invalid field. |
| QUOTE_FAILED | No quote could be produced for this route or amount. |
| DEPOSIT_SUBMISSION_FAILED | The deposit couldn’t be submitted for tracking. |
| STATUS_CHECK_FAILED | The payment’s status couldn’t be fetched. |
| REQUEST_TIMEOUT | The backend didn’t answer within 20 seconds. |
| NETWORK_ERROR | The backend couldn’t be reached. |
| INTERNAL_ERROR | The backend failed unexpectedly. |
| UNKNOWN_ERROR | Anything else. |