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 empty string handler #4

Merged
merged 4 commits into from
Aug 27, 2024
Merged

add empty string handler #4

merged 4 commits into from
Aug 27, 2024

Conversation

magdaaniol
Copy link
Contributor

Currently the reset_stream event handler is not catching any exceptions. We should minimally handle the empty stream exception and malformed task structure exception.

This PR added the handler of empty stream (which is likely to happen because the query might not return any results).
The malformed task structure is less likely and it is now failing with console error (before it was hanging in an infinite loop) It's hard to catch without modifying the current front end. Ideally, we would be validating the stream before sending it to the front end, but for that we need structured stream planned for Prodigy v2.

@koaning
Copy link
Contributor

koaning commented Aug 24, 2024

It seems I still get notifications. That said, I figured I might share this blogpost with a cautionary tale about lunr. Lessons learned over at calmcode.

https://calmcode.io/blog/memory

@magdaaniol
Copy link
Contributor Author

Thanks @koaning

It seems I still get notifications.

I suppose it's because you're watching this repo? :)

@magdaaniol magdaaniol merged commit e8989e4 into main Aug 27, 2024
1 check passed
@magdaaniol magdaaniol deleted the fix/add-exception-handling branch August 27, 2024 07:42
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.

2 participants