# Error Handling

The AkashicPay SDK may throw or return errors (extending the default error object of the language) with specific error codes. For the `/payout` endpoint, errors are typically returned rather than thrown. Below is a list of Akashic-specific errors, their explanations, and recommended actions.

| Error Code                    | Explanation                                                                  | What to Do                                                                                                                                     |
| ----------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| OTK\_ONBOARDING\_FAILED       | Failed to set up an OTK on AkashicChain for testing.                         | Try again. If it persists, contact [AkashicPay Support](https://t.me/akashicpay_support_bot).                                                  |
| INVALID\_PRIVATE\_KEY\_FORMAT | The private key or recovery phrase used to instantiate the SDK is invalid.   | Double-check your variables and try again.                                                                                                     |
| WALLET\_CREATION\_FAILURE     | Failed to create an L1 wallet on AkashicChain.                               | Try again. If it persists, contact [AkashicPay Support](https://t.me/akashicpay_support_bot).                                                  |
| UNHEALTHY\_WALLET             | A wallet was created on AkashicChain but could not be verified as safe.      | Try again. If it persists, contact [AkashicPay Support](https://t.me/akashicpay_support_bot).                                                  |
| ACCESS\_DENIED                | Attempted to access the OTK in a production environment (not allowed).       | Do not attempt this in production.                                                                                                             |
| L2ADDRESS\_NOT\_FOUND         | Formatting error or the L2 address does not exist for a Layer 2 transaction. | Double-check your input and try again.                                                                                                         |
| NOT\_SIGNED\_UP               | SDK instantiated without completing setup on AkashicPay.com.                 | Complete the setup on [AkashicPay.com](https://akashicpay.com/) and try again.                                                                 |
| FUNDS\_EXCEEDED               | Attempted to withdraw more funds than available.                             | Check your balances and inputs and try again.                                                                                                  |
| ASSIGNMENT\_FAILED            | Failed to create an L1 wallet on AkashicChain.                               | Try again. If it persists, contact [AkashicPay Support](https://t.me/akashicpay_support_bot).                                                  |
| INVALID\_PARAMETER            | Invalid argument provided to a function (Java and C# only).                  | Double-check your inputs for syntax errors.                                                                                                    |
| UNKNOWN\_ERROR                | An unspecified error occurred.                                               | Check the error message details. Retry after a short delay. If it persists, contact [AkashicPay Support](https://t.me/akashicpay_support_bot). |
