Skip to content

Commit f7e4c2b

Browse files
committed
explain error propagation logic
1 parent 3eb5274 commit f7e4c2b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/webserver/error_with_status.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ pub trait ActixErrorStatusExt<T> {
7676

7777
impl<T> ActixErrorStatusExt<T> for Result<T, actix_web::Error> {
7878
fn with_actix_error_status(self) -> anyhow::Result<T> {
79+
// Snapshot the HTTP status before converting to anyhow, which does not preserve Actix's response mapping for later inspection.
7980
self.with_status_from(|e| e.as_response_error().status_code())
8081
}
8182
}

0 commit comments

Comments
 (0)