Skip to content

Commit

Permalink
Logging (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikreppel authored Apr 26, 2024
1 parent 26c61f1 commit 647c17f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/api/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,21 @@ pub async fn summary(State(state): State<AppState>) -> Result<Json<SummaryRespon
node_info: info.into(),
}))
}
Err(_e) => Err(StatusCode::INTERNAL_SERVER_ERROR),
Err(e) => {
tracing::error!(
error = e.to_string(),
"Error returned from controller when fetching network state for /summary"
);
Err(StatusCode::INTERNAL_SERVER_ERROR)
}
},
Err(_e) => Err(StatusCode::INTERNAL_SERVER_ERROR),
Err(e) => {
tracing::error!(
error = e.to_string(),
"Error receving result from channel when fetching network state for /summary"
);
Err(StatusCode::INTERNAL_SERVER_ERROR)
}
}
}

Expand Down

0 comments on commit 647c17f

Please sign in to comment.