From 5ff6708781b8e4d112fd9ba8c4fc25846042a4ac Mon Sep 17 00:00:00 2001 From: MingxuanGame Date: Thu, 2 Oct 2025 08:07:05 +0000 Subject: [PATCH] feat(beatmapset): add error handling for missing beatmapset additions --- app/service/beatmapset_update_service.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/service/beatmapset_update_service.py b/app/service/beatmapset_update_service.py index 32c4052..68fcfdd 100644 --- a/app/service/beatmapset_update_service.py +++ b/app/service/beatmapset_update_service.py @@ -156,8 +156,13 @@ class BeatmapsetUpdateService: ) total = 0 for missing in missings: - if await self.add_missing_beatmapset(missing): - total += 1 + try: + if await self.add_missing_beatmapset(missing): + total += 1 + except Exception as e: + logger.opt(colors=True).error( + f"[BeatmapsetUpdateService] failed to add missing beatmapset {missing}: {e}" + ) if total > 0: logger.opt(colors=True).info(f"[BeatmapsetUpdateService] added {total} missing beatmapset") self._adding_missing = False