fix: fallback on incomplete current user (#91)
CI / lint (pull_request) Successful in 9s
CI / build-frontend (pull_request) Successful in 5s

This commit is contained in:
timmy committed 2026-08-06 09:17:16 +00:00
1 parent 240d962ec3
commit 42b659e807
2 files changed
+23

No files matched your search

+2
View File
@@ -79,6 +79,8 @@ async def context() -> JSONResponse:
)
if not isinstance(user_data, dict):
raise ValueError("Gitea current-user response was not an object")
if not all(field in user_data for field in ("id", "login")):
raise ValueError("Gitea current-user response did not include id and login")
except Exception as e:
error_message = (
f"Gitea context request timed out after {CONTEXT_TIMEOUT_SECONDS:g}s"