diff --git a/common/osu/difficultycalculator.py b/common/osu/difficultycalculator.py index 8bc7b83..f71bfbb 100644 --- a/common/osu/difficultycalculator.py +++ b/common/osu/difficultycalculator.py @@ -332,9 +332,13 @@ def calculate_score(self, score: Score) -> Calculation: ) response.raise_for_status() data = response.json() + except httpx.HTTPStatusError as e: + raise CalculationException( + f"An error occured in calculating the beatmap {score.beatmap_id}: {e.request.url} [{e.response.status_code}] {e.response.text}" + ) from e except httpx.HTTPError as e: raise CalculationException( - f"An error occured in calculating the beatmap {score.beatmap_id}: [{e.response.status_code}] {e.response.text}" + f"An error occured in calculating the beatmap {score.beatmap_id}: {e.request.url} - {e}" ) from e return Calculation( @@ -350,10 +354,14 @@ def calculate_score_batch(self, scores: Iterable[Score]) -> list[Calculation]: ) response.raise_for_status() data = response.json() - except httpx.HTTPError as e: + except httpx.HTTPStatusError as e: raise CalculationException( f"An error occured in calculating the beatmaps {set(score.beatmap_id for score in scores)}: [{e.response.status_code}] {e.response.text}" ) from e + except httpx.HTTPError as e: + raise CalculationException( + f"An error occured in calculating the beatmaps {set(score.beatmap_id for score in scores)}: {e}" + ) from e return [ Calculation(