-
Bug
-
Resolution: Fixed
-
Low
-
9.0.0
-
1
-
Severity 3 - Minor
-
Issue Summary
When an invalid JSON is provided in the request body for the Update Merge Strategies POST API (/api/latest/admin/pull-requests/<<scmId>>) in Bitbucket 9.x, the response for a 400 Bad Request is returned in plain text rather than the documented JSON format. This issue is specific to requests with invalid JSON bodies; other bad requests, like those with unsupported merge strategies, still return responses in the expected JSON format. This inconsistency disrupts integration with external plugins, as they cannot properly handle the exception.
This is reproducible on Data Center: (yes)
Steps to Reproduce
- Send invalid JSON syntax in the request body for the POST API /api/latest/admin/pull-requests/{scmId}
Expected Results
- The 400 bad request is formatted in JSON.
Actual Results
- The 400 bad request is formatted in plain text instead of JSON.
Workaround
- Currently there is no known workaround for this behavior. A workaround will be added here when available