Skip to content

Commit 9ff0dd0

Browse files
authored
Merge pull request #11 from f5devcentral/enhancements
add log info if auth failed
2 parents 5e59078 + 2bc2f3a commit 9ff0dd0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ def get(self, url: str = None) -> Response | bool:
201201
r = self.session.get(url)
202202

203203
if 200 != r.status_code:
204+
if r.status_code == 401 or r.status_code == 403:
205+
self.logger.info("get failed for {} with authentication error: <{}>".format(url, r.status_code))
204206
self.logger.debug("get failed for {} with {}".format(url, r.status_code))
205207
return False
206208

0 commit comments

Comments
 (0)