We are using the bitbucket rest API to commit files by sending a POST request using the following endpoint.
For some of the requests, the response we receive is “Bad Request (400)” with no additional information around what could have caused the request to fail. I acknowledge the fact that this error code means that the request is malformed but in our case, we haven’t been able to identify a pattern that could raise this error since its not the case for every single request and having no additional information around the error makes it even difficult to narrow down to the origin of the issue.
To be able to diagnose this issue further on our end, would it be possible to have some additional information/context along with the error message via some sort of settings maybe a debug mode? That would give a clue around what could have been a potential cause behind the request being rejected.
Via some internal logging we have in place, I can see files being attached to requests before its dispatched in each case, number of files can be from anywhere between 50-200 (but I don’t think thats the issue).
For some additional context we have a service that triggers this API call, having form fields to hold information like files, commit message, author and branch.
This is the error we receive at the moment: