Skip to content

Commit

Permalink
feat: log error before losing detail in chart.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-hagemann committed Nov 20, 2024
1 parent c85f168 commit cf34641
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions crates/ratings_new/src/grpc/charts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,15 @@ impl Chart for ChartService {
};
Ok(Response::new(payload))
}
Err(error) => match error {
ChartError::NotFound => {
Err(Status::not_found("Cannot find data for given timeframe."))
Err(e) => {
error!("Error in get_votes_summary: {:?}", e);
match e {
ChartError::NotFound => {
Err(Status::not_found("Cannot find data for given timeframe."))
}
_ => Err(Status::unknown("Internal server error")),
}
_ => Err(Status::unknown("Internal server error")),
},
}
}
}
}
Expand Down

0 comments on commit cf34641

Please sign in to comment.