Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error handling on topic message subscriptions #1890

Closed
rokn opened this issue Sep 19, 2023 · 0 comments · Fixed by #1907
Closed

Fix error handling on topic message subscriptions #1890

rokn opened this issue Sep 19, 2023 · 0 comments · Fixed by #1907
Assignees
Labels
bug Something isn't working
Milestone

Comments

@rokn
Copy link
Contributor

rokn commented Sep 19, 2023

Description

When we subscribe to an HCS topic for messages we are not returning to the user any feedback if there was an grpc error like we do in the other SDKs through the errorHandler. This leads to the users not being able to react accordingly. We should return the error we receive after the max attempts have been reached.

Steps to reproduce

  1. Subscribe to a topic with
    new TopicMessageQuery()
        .setTopicId(topicId)
        .setStartTime(0)
        .subscribe(client, (message, error) => {
                console.log(message)
                console.log(error)
            }, (message) =>
            console.log(Buffer.from(message.contents).toString("utf8"))
        );
  1. Run the code above
  2. Turn off wifi
  3. An error should pop out but it doesn't.

Additional context

No response

Hedera network

mainnet, testnet, previewnet

Version

2.34.1

Operating system

None

@rokn rokn added the bug Something isn't working label Sep 19, 2023
@rokn rokn self-assigned this Sep 19, 2023
@Petyo-Lukanov Petyo-Lukanov added this to the 2.35.0 milestone Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants