Comment on page
Errors
To know the error response from Startrail-Sdk-Js
Errors inheriting from
Error
objects will be thrown, and custom error properties are described in the Response
belowVariable | Type | Description |
---|---|---|
from | "StartrailSdk" | To identify where the error comes from |
errorCode | ErrorCode | To identify the error type for error handling |
Followings are the errors to be returned. Frontend can catch and handle it accordingly for better UX.
What:
Immediately after signup is submitted with Email Password by a user, this error is thrown.
Action to take:
You can customize the UI/UX to align with your project's specific plans and requirements. How you choose to handle this customization depends on the unique needs of your project.
What:
It is not possible to prevent end-users from switching their EOA on Metamask even after logging in, which can potentially lead to a scenario where the EOA used for signing, e.g., for issuing SRR, is different from the one they initially logged into the web application.
When
When SDK calls StartrailAPI
Action to take:
Request to switch back to the EOA with which the user originally logged in.
Example
{
from: 'StartrailSdk',
errorCode: 'TORUS_USER_REJECT_WALLET_REQUEST',
message: 'Torus Message Signature: User denied message signature.',
}