use axum::{ http::StatusCode, response::{IntoResponse, Response}, }; #[derive(Debug, thiserror::Error)] #[error("{0}")] pub struct NotFound(pub E); impl IntoResponse for NotFound where E: IntoResponse, { fn into_response(self) -> Response { let Self(response) = self; (StatusCode::NOT_FOUND, response).into_response() } }