Exceptions in Eniblock Wallet SDK
This document categorizes and explains various exceptions that users might encounter while integrating and using the Eniblock Wallet SDK. These exceptions cover a range of issues from authorization failures to configuration errors, each with its cause and resolution steps. Understanding these exceptions is crucial for smooth integration and operation of the SDK in your application.
The Eniblock Wallet SDK adopts a structured approach to exceptions to enhance clarity and facilitate debugging. Each exception is encapsulated within a structured object, comprising several fields that detail the nature and specifics of the encountered error. This structured format aids developers in quickly understanding and addressing issues.
Exception Object Fields
Each exception object encapsulates detailed information about an error that occurred during execution. It includes the following fields:
name: A string representing the name of the exception. This serves as a concise identifier that categorizes the type of error encountered.
message: An object containing detailed information about the exception, structured as follows:
statusCode(number): Reflects the HTTP status code associated with the exception. These codes are standardized responses from the originating server that indicate the nature of the error, aiding in its initial diagnosis. For example, a
404status code denotes a "Not Found" error, while a
500indicates an "Internal Server Error".
timestamp(string, ISO8601 format): Records the exact date and time when the exception occurred, in the ISO8601 format (
YYYY-MM-DDTHH:mm:ss.sssZ). This timestamp is crucial for tracking the occurrence of errors and facilitating debugging processes.
traceId(string): Acts as a unique identifier for the request or operation that triggered the exception. Having a
traceIdenables developers to precisely trace back and understand the sequence of events leading to the error, significantly aiding in troubleshooting.
urlDetails(string, URI format): Provides a URI that directs to detailed documentation or additional resources relevant to the type of error encountered. This link is invaluable for developers looking for an in-depth understanding of the issue or potential solutions to resolve it.
Occurs when attempting to access resources without sufficient privileges.
Ensure the user has the required privileges.
Triggered by failed login attempts, often related to access token issues.
Review the access token configuration using the Access Token Configuration Guide.
Not Authorized Bad Pin Code
This error is triggered by attempting to access the storage with an incorrect pin code.
- Ensure the pin code is correctly formatted and valid for the operation you are attempting to perform.
Plan Limits Exceeded
Triggered when the limits of the subscribed plan are reached.
You can upgrade your plan to increase the plan limits here : Plan Subscription Upgrade.
Resource Not Found
Indicates attempts to access non-existent SDK resources.
Check the accuracy of resource identifiers used in SDK calls.
Unauthorized App ID
Occurs when the SDK is initialized without an app ID or with an incorrect one.
Unauthorized Jwks Uri
Triggered when the JWKS URI is missing or incorrect during app initialization.
- Correct the JWKS URI in the app configuration.
- Detailed instructions available at Application Registration.
Triggered when instantiating a new account with an invalid alias.
- Correct the alias respecting the following rules:
- Length between 3 and 64
- contains only letters, numbers, spaces and special caracters
Triggered when an error occurred during the communication with the indexer Alchemy.
You can check the status of Alchemy here : Status Alchemy.
This exception indicates an unspecified or general error that doesn't fall under the specific categories previously outlined. It usually suggests an unforeseen issue within the SDK's operation.
- Document the Exception Details: Before reaching out for support, make sure to document the error message, the circumstances leading up to the exception, and any other relevant details. This information will be crucial for troubleshooting.
- Contact Support Based on Your Subscription Plan:
- Free Plan Subscribers: For basic or initial troubleshooting, free plan users can seek assistance from the community. Join the discussion and seek help at Eniblock Community on Discord.
- Pro Plan Users: Subscribers of the Pro plan should utilize the dedicated support channel for more personalized and in-depth assistance. Reach out through the Eniblock Pro Support Portal.