Add error handler.

pull/1080/head
Andrey 2024-06-04 23:54:47 +03:00
rodzic 5315b52694
commit d5ba535a75
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -779,6 +779,12 @@ async def leaderboard_push_scores(
status_code=500,
detail=f"Delete scores failed.",
)
except actions.LeaderboardPushScoreError as e:
logger.error(f"Add scores failed with error: {e}")
raise EngineHTTPException(
status_code=500,
detail=f"Add scores failed.",
)
except Exception as e:
logger.error(f"Score update failed with error: {e}")
raise EngineHTTPException(status_code=500, detail="Score update failed.")