Skip to content

Commit a04a5a5

Browse files
author
Gauvain Pocentek
committed
return explicit error message on 404
1 parent 34e4304 commit a04a5a5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gitlab.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ def get(self, obj_class, id=None, **kwargs):
242242
return r.json()
243243
elif r.status_code == 401:
244244
raise GitlabAuthenticationError(r.json()['message'])
245+
elif r.status_code == 404:
246+
raise GitlabGetError("Object doesn't exist")
245247
else:
246248
raise GitlabGetError('%d: %s' % (r.status_code, r.text))
247249

0 commit comments

Comments
 (0)