Skip to content

Probe: Actually return errors instead of logging them #285

@MeFisto94

Description

@MeFisto94

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions