Skip to content

Commit 61e4d79

Browse files
committed
Change error handling for user settings and recent applications to return 404 status instead of 500
1 parent 615e384 commit 61e4d79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

solver-bot/src/main/python/spring_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ async def get_user_settings(user_id, method, rounding, language, hints):
7979
async with session.get(
8080
f"{os.getenv('CLIENT_API_URL')}/users/{user_id}/settings"
8181
) as response:
82-
if response.status == 500:
82+
if response.status == 404:
8383
return {
8484
"method": method,
8585
"rounding": rounding,
@@ -102,7 +102,7 @@ async def get_recent_applications(user_id):
102102
async with session.get(
103103
f"{os.getenv('CLIENT_API_URL')}/users/{user_id}/applications"
104104
) as response:
105-
if response.status == 500:
105+
if response.status == 404:
106106
return []
107107

108108
response.raise_for_status()

0 commit comments

Comments
 (0)