Skip to content

Commit

Permalink
fix: display reason for performance calc failure
Browse files Browse the repository at this point in the history
  • Loading branch information
tsunyoku committed Nov 5, 2023
1 parent 6964176 commit 2a5f3c1
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/api/routes/calculate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,21 @@ async fn calculate_play(

let result = match raw_result {
Ok(result) => result,
Err(_) => CalculateResponse {
stars: 0.0,
pp: 0.0,
ar: 0.0,
od: 0.0,
max_combo: 0,
},
Err(e) => {
log::error!(
"Performance calculation failed for beatmap {}: {}",
request.beatmap_id,
e.to_string()
);

CalculateResponse {
stars: 0.0,
pp: 0.0,
ar: 0.0,
od: 0.0,
max_combo: 0,
}
}
};

log::info!(
Expand Down

0 comments on commit 2a5f3c1

Please sign in to comment.