Skip to content
Snippets Groups Projects
Commit 299201d7 authored by Robert Latta's avatar Robert Latta
Browse files

updated _is_invalid_login_status due to api response change

parent 110cbd80
No related branches found
No related tags found
No related merge requests found
......@@ -141,18 +141,6 @@ class IMS(object):
if response_.status_code == requests.codes.unauthorized:
return True
if response_.status_code == requests.codes.ok:
j = response_.json()
if j is None:
# Sometime the API returns a 200 response but with no
# body when the token has expired e.g. on a filtered query
# This also happens when there is an error in the query :(
return True
if j and isinstance(j, dict) and \
j.get('HasErrors', False) and 'guid expired' in \
j['Errors'][0]['ErrorMessage'].lower():
return True
return False
while True:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment