From 0d5f275d9b23d20da45ac675da10bfd428327a2f Mon Sep 17 00:00:00 2001 From: "P. F. Chimento" Date: Sun, 3 Dec 2017 13:17:15 -0800 Subject: [PATCH] Expected HTTP response for subscribe is 201 It seems that the GitLab API gives HTTP response code 201 ("created") when successfully subscribing to an object, not 200. --- gitlab/v3/objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab/v3/objects.py b/gitlab/v3/objects.py index ab815215f..0db9dfd6b 100644 --- a/gitlab/v3/objects.py +++ b/gitlab/v3/objects.py @@ -934,7 +934,7 @@ def subscribe(self, **kwargs): {'project_id': self.project_id, 'issue_id': self.id}) r = self.gitlab._raw_post(url, **kwargs) - raise_error_from_response(r, GitlabSubscribeError) + raise_error_from_response(r, GitlabSubscribeError, 201) self._set_from_dict(r.json()) def unsubscribe(self, **kwargs):