Skip to content

Unsatisfactory error recovery story with Response::end() #427

Open
@abonander

Description

@abonander

If Response::end() fails, the response is consumed so there's no way to create a NickelError without unsafe (except that NickelError has all fields public so it's possible to bypass the constructor completely). The reasoning for unsafe on NickelError::without_response() talks about deadlock if the response is not flushed, which is what the user is trying to do by calling Response::end(). So if the flush fails, what are we meant to do? It seems like a guaranteed deadlock since we can't call bail() now.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions