Skip to content

Commit

Permalink
Merge pull request #332 from sohosai/feature/fix-error-logging
Browse files Browse the repository at this point in the history
Errorのコンテキストをログに出力するようにした
  • Loading branch information
arata-nvm authored Aug 23, 2024
2 parents d849909 + e10a2c0 commit 74197ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/sos24-presentation/src/error/convert_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,9 @@ impl From<PermissionDeniedError> for AppError {

impl From<anyhow::Error> for AppError {
fn from(error: anyhow::Error) -> AppError {
// anyhow::Errorのコンテキストが破棄されてしまうので、ここでログに出力する
tracing::error!("{:#}", error);

AppError::new(
StatusCode::INTERNAL_SERVER_ERROR,
"internal-error".to_string(),
Expand Down

0 comments on commit 74197ef

Please sign in to comment.