Skip to content

Commit

Permalink
return explicit error message on 404
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed May 19, 2013
1 parent 34e4304 commit a04a5a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gitlab.py
Expand Up @@ -242,6 +242,8 @@ def get(self, obj_class, id=None, **kwargs):
return r.json()
elif r.status_code == 401:
raise GitlabAuthenticationError(r.json()['message'])
elif r.status_code == 404:
raise GitlabGetError("Object doesn't exist")
else:
raise GitlabGetError('%d: %s' % (r.status_code, r.text))

Expand Down

0 comments on commit a04a5a5

Please sign in to comment.