Commit cc38e1b8 authored by James Powis's avatar James Powis

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
parent 26fc6a49
......@@ -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'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment