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.
Somewhat related to #3758
&mutequivalents ofactix_web::Error::as_response/as_errorand similarlyHttpResponse::errorcould be provided.An example use case for them: when an
actix_web::Errorwraps a custom Error type that provides an unresolvedbacktrace::Backtrace(via Backtrace::new_unresolved). Allowing mutability of its inner Error enables the ability to resolve such aBacktraceas lazily as possible/only when needed, e.g. in a middleware that emits certain Error's stacktraces to a service like Sentry.