summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Powis <james.powis@charter.com>2018-12-06 14:46:09 -0700
committerJames Powis <james.powis@charter.com>2018-12-06 14:46:09 -0700
commitcc38e1b8ea510ccd5bfa188f6ab2d2cc4424479a (patch)
treeb6e6d6099ba82ec9db787038900820685ef70410
parent26fc6a4958c012b3f6c15cc01a6684e87d381488 (diff)
downloadgitlab-ce-cc38e1b8ea510ccd5bfa188f6ab2d2cc4424479a.tar.gz
Fixed misreported error codes and elaborated
Documentation mixed up 406 and 405 error codes, this corrects that Also elaborated on the possible ways you can receive a 405 error code See spec test: https://gitlab.com/powisj/gitlab-ce/blob/master/spec/requests/api/merge_requests_spec.rb#L848
-rw-r--r--doc/api/merge_requests.md5
1 files changed, 2 insertions, 3 deletions
diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md
index fc03cf6cc39..9ff6c73b1b6 100644
--- a/doc/api/merge_requests.md
+++ b/doc/api/merge_requests.md
@@ -974,10 +974,9 @@ curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://git
Merge changes submitted with MR using this API.
+If merge request is unable to be accepted (ie: Work in Progress, Closed, Pipeline Pending Completion, or Failed while requiring Success) - you'll get a `405` and the error message 'Method Not Allowed'
-If it has some conflicts and can not be merged - you'll get a `405` and the error message 'Branch cannot be merged'
-
-If merge request is already merged or closed - you'll get a `406` and the error message 'Method Not Allowed'
+If it has some conflicts and can not be merged - you'll get a `406` and the error message 'Branch cannot be merged'
If the `sha` parameter is passed and does not match the HEAD of the source - you'll get a `409` and the error message 'SHA does not match HEAD of source branch'