Skip to content

[UI]: How to catch the TON_CONNECT_SDK_ERROR error? #202

Open
@bchevalier

Description

@bchevalier

Your Question

My application is triggering tons of TON_CONNECT_SDK_ERROR errors with the message Operation aborted.
However, those are all uncaught promise exceptions. How can I catch them to handle them properly?

Here is the code of the application, note that I am handling errors in the status change:

    this.tonConnectUI = new TonConnectUI({
      manifestUrl: `${myUrl}/tonconnect-manifest.json`,
    });

    this.tonConnectUI.onStatusChange(
      async (status: ConnectedWallet | null) => onStatusChange,
      (error: TonConnectError) => {
        trackError('WalletConnectError', {
          name: error.name,
          message: error.message,
        });
      },

Context

No response

What have you tried so far?

No response

Relevant Code or Commands

No response

Documentation Check

  • Yes, I have checked the documentation.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions