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

add error handler to subscribe #785

Closed

Conversation

Louis-Tian
Copy link

Related to #757.

Expose a error handler on the subscribe function so any error happened while streaming replica can be handled in user space.

@mattbishop
Copy link

Can you update the Typescript definition to include this please?

@Louis-Tian
Copy link
Author

@mattbishop done. Happy to add a test case for it as well.

But I am not sure what would be best way to go about it. Specifically what's the best way to stub the stream in test to force an error?

@porsager
Copy link
Owner

@Louis-Tian I have some other tests where I just terminate the backend. Perhaps that's a way forward?

@Louis-Tian
Copy link
Author

@porsager That's kind of what I am doing in the error handler anyway so that will work for me. Just think it would be better to let the user to decide to what do? But if there is other things that require a direct termination then I guess it make perfect sense to just leverage on that.

@porsager
Copy link
Owner

This already seems to be merged, so I don't understand why the PR is still open.

@porsager porsager closed this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants