Create a commit - Bad Request (400)

Hassan Ahmed
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 29, 2024

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:

Screenshot 2024-01-29 at 18.21.14.png

1 answer

1 vote
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 30, 2024

G'day, @Hassan Ahmed 

Welcome to the community!

I believe your questions are better posted in the Atlassian developer community as they relate to customization.

Regards,
Syahrul

Hassan Ahmed
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 31, 2024

Hi, thanks for pointing me in the right direction, will post on devs forum as well.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events