> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pesapay.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Every SDK error, what to tell the user, and whether they can start again.

Every verb returns or throws one error: `SdkError` in Swift, `SdkException` in Kotlin, with the same variants. The SDK never retries, and your app must not retry behind the user's back. A capture that failed before the reply was frozen cannot be resumed.

| Variant | What the user should read | Start again? |
| - | - | - |
| `NotLoggedIn` | Sign-in was not completed. | When they choose |
| `SessionLost` | The connection dropped before the record was captured. | When they choose |
| `Cancelled` | Nothing, or "Cancelled". | When they choose |
| `WrongEvidence`, `Truncated`, `ExtraResponse`, `Reordered` | The provider's reply could not be verified. | Once; if it repeats, report it |
| `LimitExceeded` | This check is not available right now. | Later |
| `InsufficientMemory` | Close other apps, then try again. | When they choose |
| `Transport` | A network problem. | When they choose |
| `Policy` | Depends on the message. | Only after the cause is fixed |

## Details

<AccordionGroup>
  <Accordion title="NotLoggedIn">
    `login` ended with no cookie of the profile's domains: the user declined the disclosure, closed the page, or signed in to a page that set none. Also raised when `capture` is called before `login`. Each login serves one capture.
  </Accordion>

  <Accordion title="SessionLost">
    The capture ended before the reply was frozen, because the network dropped or the app was suspended. Also raised when `prove` is called 120 seconds or more after its capture (the verifier refuses older receipts), counting the time the phone slept.
  </Accordion>

  <Accordion title="Cancelled">
    `cancel()` was called, or the task running the verb was cancelled, including your own cancel from the lifecycle's expiry callback. In Kotlin, cancelling the coroutine ends it with its own `CancellationException` instead.
  </Accordion>

  <Accordion title="WrongEvidence, Truncated, ExtraResponse, Reordered">
    `WrongEvidence`: an enclave's receipt did not match its opening. If it repeats, report it with the time and your app credential's ID. `Truncated`: the reply ended before its declared length. `ExtraResponse`: the provider sent more than the profile allows. `Reordered`: TLS records arrived out of order.
  </Accordion>

  <Accordion title="InsufficientMemory">
    `prove` did not start, because the phone has less free memory than the proof needs at its peak. The capture is spent; the user starts a new session after closing other apps.
  </Accordion>

  <Accordion title="Transport">
    A network failure on the way to the front door, an enclave or the verifier. The text is the raw reason: `verifier unreachable: ...`, `the allocation named no verifier` (none ready; try later), or `allocate returned <status>: <body>` (400 malformed field, 401 or 403 credential problem, 429 quota).
  </Accordion>
</AccordionGroup>

## Reading the text

`Transport` and `Policy` carry their text. In Swift: `case .Transport(let text)`. In Kotlin: `e.v1` (`e.message` reads `v1=<text>`).

## Support requests

Send the SDK version, the device and OS, the error variant and message, the time, and your app credential's ID. Never send cookies, handles or user data.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.