diff --git a/rplugin/python3/CopilotChat/copilot.py b/rplugin/python3/CopilotChat/copilot.py index eb79e135..2723c5dd 100644 --- a/rplugin/python3/CopilotChat/copilot.py +++ b/rplugin/python3/CopilotChat/copilot.py @@ -89,6 +89,8 @@ def authenticate(self): } self.token = self.session.get(url, headers=headers).json() + if not self.token.get("token"): + raise Exception(f"Failed to authenticate: {self.token}") def reset(self): self.chat_history = []