Skip to content

Commit

Permalink
Improve error message on auth failure
Browse files Browse the repository at this point in the history
  • Loading branch information
pederhan committed Aug 26, 2024
1 parent 949eba9 commit 3c3743d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zabbix_cli/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ def login(self) -> str:
)
continue
else:
raise AuthError("No authentication method succeeded.")
raise AuthError(
f"No authentication method succeeded for {self.config.api.url}. Check the logs for more information."
)

def do_login(self, credentials: Credentials) -> str:
"""Log in to the Zabbix API using the provided credentials."""
Expand Down

0 comments on commit 3c3743d

Please sign in to comment.