1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 08:57:00 +02:00

Middleware response() is not invoked if there was an error in async handler #187

This commit is contained in:
Nikolay Kim
2018-04-18 14:15:53 -07:00
parent 022f9800ed
commit f907be585e
5 changed files with 41 additions and 3 deletions

View File

@@ -420,7 +420,7 @@ impl<S: 'static> WaitingResponse<S> {
match self.fut.poll() {
Ok(Async::NotReady) => None,
Ok(Async::Ready(response)) => Some(RunMiddlewares::init(info, response)),
Err(err) => Some(Response::init(err.into())),
Err(err) => Some(RunMiddlewares::init(info, err.into())),
}
}
}