From a04a5a5fda2e2400e56d2f05c2d3530728d73367 Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Sun, 19 May 2013 06:36:57 +0200 Subject: return explicit error message on 404 --- gitlab.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gitlab.py') diff --git a/gitlab.py b/gitlab.py index ae9245c..78ede59 100644 --- a/gitlab.py +++ b/gitlab.py @@ -242,6 +242,8 @@ class Gitlab(object): 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)) -- cgit v1.2.1