Skip to content

snafu errors are ugly when mapping from anyhow::Error #3373

Open
@Arqu

Description

@Arqu

A ProtocolHandler impl now requires the functions to return AcceptError and if the code under it uses anyhow it forces an ugly conversion with .map_err(|e| AcceptError::from(Box::<dyn std::error::Error + Send + Sync>::from(e)))

This could be at least cleaned up a bit with a From<anyhow::Error> implementation even though it's against the grain to have concrete error types for everything, it at least gives an escape latch for devs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions