8000 Expected HTTP response for subscribe is 201 · python-gitlab/python-gitlab@0d5f275 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0d5f275

Browse files
authored
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.
1 parent 084b905 commit 0d5f275

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitlab/v3/objects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ def subscribe(self, **kwargs):
934934
{'project_id': self.project_id, 'issue_id': self.id})
935935

936936
r = self.gitlab._raw_post(url, **kwargs)
937-
raise_error_from_response(r, GitlabSubscribeError)
937+
raise_error_from_response(r, GitlabSubscribeError, 201)
938938
self._set_from_dict(r.json())
939939

940940
def unsubscribe(self, **kwargs):

0 commit comments

Comments
 (0)
0