PUT requests on a merge request using API v4 throws a Bad Request
A customer is trying to update the label on a merge request using the API and getting a 400 Bad Request
error.
- Zendesk ticket (Internal): https://gitlab.zendesk.com/agent/tickets/83404
I was able to reproduce the problem using an Admin personal access token:
$ curl -X PUT --header "PRIVATE-TOKEN:$TOKEN" http://<url>/api/v4/projects/4/merge_requests/1?labels=bug
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>
The label bug
exists in my project and I am able to find the merge request with a GET
request. Confirmed on, both, 10.0.3 and 9.5.2, both EE. I even tried to update the title
and got the same error. Per the docs these are both configurable attributes.