refactor: raise error on auth failure and clean up meeks-ai fallback
This commit is contained in:
+2
-2
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user