Skip to content

Provide mutable reference APIs for errors #4061

@pjenvey

Description

@pjenvey

Somewhat related to #3758

&mut equivalents of actix_web::Error::as_response/as_error and similarly HttpResponse::error could be provided.

An example use case for them: when an actix_web::Error wraps a custom Error type that provides an unresolved backtrace::Backtrace (via Backtrace::new_unresolved). Allowing mutability of its inner Error enables the ability to resolve such a Backtrace as lazily as possible/only when needed, e.g. in a middleware that emits certain Error's stacktraces to a service like Sentry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions