Error Handling and Troubleshooting
Common Errors
Invalid Public Token
Description: This error occurs if the public token provided is incorrect or not recognized by the TMAWallet service.
Solution: Verify that you are using the correct public token for your project. Make sure there are no typos and that the token is active.
Bundle Not Found
Description: This error is thrown when attempting to access a wallet bundle that doesn't exist.
Solution: Use the
createBundle()
method to create a new wallet bundle before attempting to access it.
Storage Access Denied
Description: This occurs when the SDK is unable to access Telegram cloud storage, likely due to missing permissions.
Solution: Ensure that the Telegram app has the necessary permissions to access cloud storage. Verify the permissions in the Telegram settings.
Network Error
Description: A network error may occur if there is an issue with the internet connection or if the blockchain network is temporarily unavailable.
Solution: Check your internet connection and try again. If the issue persists, check the status of the Ethereum network.
Debugging Tips
Enable Debug Logs
To facilitate debugging, you can enable debug logs in the SDK. This will provide detailed information about the operations being performed and any issues encountered.
Example:
Check Telegram Permissions
Ensure that the Telegram mini-app has the necessary permissions to access user data and cloud storage. Missing permissions can result in errors when trying to read or write data.
Verify Network Connectivity
Make sure that your application has a stable internet connection, especially when interacting with the Ethereum blockchain. Network issues can lead to failed transactions or data retrieval errors.
Handle Promise Rejections
Always handle promise rejections to catch errors and prevent unhandled exceptions. Use
try-catch
blocks or.catch()
to manage errors.Example:
Contact Support
If you encounter an issue that you cannot resolve using the troubleshooting steps above, consider reaching out to the TMAWallet support team. Provide as much detail as possible, including:
The version of the SDK you are using.
A description of the issue and any error messages received.
Steps to reproduce the issue.
Having this information will help the support team assist you more efficiently.
Last updated