Skip to content

Commit

Permalink
improve error message when auth token is not retrieved
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasTomecek committed Jul 29, 2015
1 parent 5058224 commit a948881
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion osbs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ def _request_args(self, with_auth=True, **kwargs):
if self.token:
headers["Authorization"] = "Bearer %s" % self.token
else:
raise ValueError("Token was not retrieved successfully.")
raise ValueError("Authentication failure. Please, check your credentials. "
"Token was not retrieved successfully.")
return headers, kwargs

def _post(self, url, with_auth=True, **kwargs):
Expand Down

0 comments on commit a948881

Please sign in to comment.