fix: fallback on incomplete current user (#91)
This commit is contained in:
1 parent
240d962ec3
commit
42b659e807
2 files changed
+23
No files matched your search
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user