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

Probe: Actually return errors instead of logging them #285

Open
MeFisto94 opened this issue May 18, 2024 · 0 comments
Open

Probe: Actually return errors instead of logging them #285

MeFisto94 opened this issue May 18, 2024 · 0 comments

Comments

@MeFisto94
Copy link

So, the title is a bit hard to get, but I stumbled over the following problem:

error!("probe reach EOF at {} bytes.", count);

Essentially, my stream wasn't ready to be read, but this code actually "ignores" the actual error (well, it's sent to a logger, which I didn't see), and returns a more generic error, that makes you believe that the detection failed or you are missing parsers.
After all, however, it was rather an IO error.

So, my suggestions would be to return a more specific error in the if clause instead.

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

No branches or pull requests

1 participant