Skip to content

Commit

Permalink
handel 401 error
Browse files Browse the repository at this point in the history
  • Loading branch information
F483 committed Sep 8, 2015
1 parent 778dab5 commit 8cb3cfd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dataserv_client/messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def _url_query(self, api_path, retries=0, authenticate=True):
raise exceptions.ServerNotFound(self._server_url)
elif e.code == 400:
raise exceptions.InvalidAddress(self.auth_address())
elif e.code == 401: # auth error (likely clock off)
logger.warning(repr(e))
self._handle_connection_error(api_path, retries, authenticate)
elif e.code == 500: # pragma: no cover
raise exceptions.ServerError(self._server_url)
else:
Expand Down

0 comments on commit 8cb3cfd

Please sign in to comment.