Skip to content

Commit

Permalink
example(axum): add trace
Browse files Browse the repository at this point in the history
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
  • Loading branch information
jdrouet committed Mar 21, 2024
1 parent e1938f9 commit 024ec98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/axum/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ enum EngineError {

impl IntoResponse for EngineError {
fn into_response(self) -> axum::response::Response {
match self {
Self::Parse(ref inner) => tracing::debug!("unable to parse: {inner:?}"),
Self::Render(ref inner) => tracing::debug!("unable to render: {inner:?}"),
};
(
axum::http::StatusCode::BAD_REQUEST,
format!("unable to convert template: {self:?}"),
Expand Down

0 comments on commit 024ec98

Please sign in to comment.