👾Errors

To know the error response from Startrail-Sdk-Js

Description

Errors inheriting from Error objects will be thrown, and custom error properties are described in the Response below

See more details for Error objectsarrow-up-right

Response

Variable
Type
Description

from

"StartrailSdk"

To identify where the error comes from

errorCode

ErrorCode

To identify the error type for error handling

ErrorCode

Followings are the errors to be returned. Frontend can catch and handle it accordingly for better UX.

chevron-rightAUTH0_VERIFY_EMAILhashtag

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.

chevron-rightMETADATA_VALIDATION_FAILEDhashtag

What:

Metadata validation fails duet to schema validation.

Action to take:

Revise the metadata object itself based on the error message.

chevron-rightSTARTRAIL_API_ERRORhashtag

What:

Error occurs in StartrailAPI.

Action to take:

Check error message to identify the content.

chevron-rightTORUS_USER_REJECT_WALLET_REQUESThashtag

What:

The user closes the confirmation popup presented for signing.

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.

chevron-rightWALLET_NOT_INITIALIZEDhashtag

What:

After logging out from the SDK, the wallet instance becomes undefined.

Action to take:

Call new Startrail() once again in your web-application.

chevron-rightWALLET_NOT_SUPPORTEDhashtag

What:

Unsupported wallet is called. (Official MetaMask library calls Coinbase Wallet browser extension when it is activated)

Action to take:

Request end-users to switch your wallet.

chevron-rightWALLET_EOA_NOT_MATCHhashtag

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.

chevron-rightWALLET_NOT_FOUNDhashtag

What:

The wallet does not open because it has not been activated (unlocked) in your browser extension.

Action to take:

Request end-users to activate or unlock your wallet.

chevron-rightWALLET_NOT_SUPPORT_FUNCTIONhashtag

What:

Some functions are not supported for particular wallets. eg. overwriteConfig() or switchLanguage() are not supported in Metamask.

Action to take:

It depends on frontend developers

Response Example

Example

Last updated

Was this helpful?