mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-27 00:00:24 +02:00
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:
@@ -26,7 +26,7 @@ async fn main() {
|
||||
|
||||
let static_files_service =
|
||||
get_service(ServeDir::new("examples/sse/assets").append_index_html_on_directories(true))
|
||||
.handle_error(|error: std::io::Error| {
|
||||
.handle_error(|error: std::io::Error| async move {
|
||||
(
|
||||
StatusCode::INTERNAL_SERVER_ERROR,
|
||||
format!("Unhandled internal error: {}", error),
|
||||
|
||||
Reference in New Issue
Block a user