refactor: raise error on auth failure and clean up meeks-ai fallback

This commit is contained in:
Michael Ingvarsson
2026-07-16 12:33:57 +02:00
parent b47a3b3146
commit c5dd178fd6
6 changed files with 95 additions and 41 deletions
+2 -2
View File
@@ -52,14 +52,14 @@ class GiteaClient(IssuesClient, PullRequestsClient, FilesClient, RefsClient, Rep
except Exception:
pass
def get_authenticated_user(self) -> UserModel | None:
def get_authenticated_user(self) -> UserModel:
try:
response = self.client.get(f"{self.base_url}/api/v1/user")
response.raise_for_status()
return UserModel(**response.json())
except Exception as e:
logger.error(f"Error getting authenticated user: {e}", exc_info=True)
return None
raise RuntimeError(f"Could not get authenticated user: {e}") from e
def list_all_user_repos(self) -> list[RepositoryModel]:
try: