forked from mtusi2026/mtusi2026lab2
Исправления после проверки: кэш, cursor, обработка ошибок
This commit is contained in:
+3
-1
@@ -45,7 +45,9 @@ async def current_user(
|
||||
rid = request.state.request_id
|
||||
try:
|
||||
user, _ = await get_current_user(request, authorization)
|
||||
except HTTPException:
|
||||
except HTTPException as exc:
|
||||
if exc.status_code == 503:
|
||||
return error_response(503, "unavailable", "auth store unavailable", rid)
|
||||
return error_response(
|
||||
401,
|
||||
"unauthorized",
|
||||
|
||||
Reference in New Issue
Block a user