Move axum-handle-error-extract into axum (#534)

* Move `axum-handle-error-extract` into axum

With 0.4 underway we can now nuke `axum-handle-error-extract` and move
its code directly into axum.

So this replaces the old `HandleErrorLayer` with one that supports async
functions and extractors.

* changelog

* fix CI
This commit is contained in:
David Pedersen
2021-11-17 19:09:58 +00:00
committed by GitHub
parent a317072467
commit 9a410371a6
28 changed files with 254 additions and 650 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ async fn main() {
let app = Router::new()
.nest(
"/static",
get_service(ServeDir::new(".")).handle_error(|error: std::io::Error| {
get_service(ServeDir::new(".")).handle_error(|error: std::io::Error| async move {
(
StatusCode::INTERNAL_SERVER_ERROR,
format!("Unhandled internal error: {}", error),