Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

The request could not be satisfied - custom jira

Mamadou NDIAYE October 20, 2023

Hi i got the same errors every time: 

i have a gitlab pipeline and need to update the jira status when a merge request is created.

But i got below errors when try to access to jira. Could you help me to find a solution for that ?

ERROR: The request could not be satisfied</TITLE> </HEAD><BODY> <H1>400 ERROR</H1> <H2>The request could not be satisfied.</H2> <HR noshade size="1px"> Bad request. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. <BR clear="all"> If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation. <BR clear="all"> <HR noshade size="1px"> <PRE> Generated by cloudfront (CloudFront) Request ID: 

2 answers

2 accepted

1 vote
Answer accepted
bmcalary
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 22, 2023 edited

UPDATE 25/1/25: Jira Cloud now uses AWS Cloudfront. AWS Cloudfront blocks GET requests with a Body payload. See  https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#RequestCustom-get-body  Most commonly we see API clients and integrations sending {} [] "" '' . Please ensure your API client does not include a body with a GET request. This information only applies to API clients, not browsers.

 

@Mamadou NDIAYE Ben from Atlassian Networking. I checked all our logs and couldn't find Request ID: uBy1dHrGLMipUSwNQf7oCkcwTbiA59L0w6BC34g71LKVpU4d-VTPHw==  .

Can you provide any more information? Was there a larger error message that included the domain name and URL returning the error message?

Feel free to open a support case if needed.

Ben.

Mamadou NDIAYE October 25, 2023

Thanks you for your feedback. I fixed my issue, my request was bad. I reworked it and never get that issue.

0 votes
Answer accepted
Zhishang Zheng February 18, 2025

Our team faced a similar issue recently, when we make http requests via rest API V3, we randomly got "HTTP/1.1 403 Forbidden", with error "ERROR: The request could not be satisfied".

Could someone kindly help take a look?

Take this request for example, it's just a simple get:
Request ID: JVH0GMkVp3T4_oUeQzB3wzZAWmQPadKXhXbUg5jqKppRUT621QTXpQ==

bmcalary
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 18, 2025

@Zhishang Zheng Upon inspection of our AWS Cloudfront logs, your request was rejected because it contained a GET with BODY.

Please refer to this guide on how to fix it https://community.atlassian.com/t5/Atlassian-Platform-articles/Jira-Confluence-Cloud-APIs-return-403-Error-The-request-could/ba-p/2928153 

Zhishang Zheng February 18, 2025

@bmcalary Thanks for the quick reply.

This is weird, we're sending such Jira API requests via our common methods, inside which:

String body = bodyObj ? JsonOutput.toJson(bodyObj) : null
response = steps.httpRequest authentication: null, ignoreSslErrors: false,
url: jiraApiServer + entry, httpMode: method, requestBody: body,
contentType: 'APPLICATION_JSON', consoleLogResponseBody: false,
validResponseCodes: requestAcceptCodes()

 

Such body string should be null. I've checked locally with the code, seems it's working this time.

 

I've also checked our history Jenkins jobs, in a previous job, with the exact same parameter, such request succeeded without issue.

 

Could you kindly help check another id again? Also it's a simple get request with failure "The request could not be satisfied":

Request ID: RlW_nvXeU3x5N-QwIUk38Beph_jeQuCvHf_dteJtJQK5y5UzdRQq7g==
bmcalary
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 18, 2025

@Zhishang Zheng hello again! This is due to https://community.atlassian.com/t5/Atlassian-Platform-articles/Jira-Confluence-Cloud-APIs-return-403-Error-The-request-could/ba-p/2928153 , which is due to new DDOS protection by Cloudfront.

As the article says, rollout is progressive, so some requests will work, some might fail if they have a GET with BODY.

You cannot send GET with request BODY anymore.

Try testing with a conditional that prevents requestBody from even being set:

def performGetRequest(url) {
return steps.httpRequest(
authentication: null,
ignoreSslErrors: false,
url: url,
httpMode: 'GET',
// No requestBody parameter for GET
consoleLogResponseBody: false,
validResponseCodes: requestAcceptCodes()
)
}

def performRequestWithBody(url, method, bodyObj) {
String body = bodyObj ? JsonOutput.toJson(bodyObj) : null
return steps.httpRequest(
authentication: null,
ignoreSslErrors: false,
url: url,
httpMode: method,
requestBody: body,
contentType: 'APPLICATION_JSON',
consoleLogResponseBody: false,
validResponseCodes: requestAcceptCodes()
)
}

// ... later in your code ...

if (method.toUpperCase() == 'GET') {
response = performGetRequest(jiraApiServer + entry)
} else {
response = performRequestWithBody(jiraApiServer + entry, method, bodyObj)
}

 

OR 

Try an inline conditional but still setting the parameter to null

response = steps.httpRequest(
authentication: null,
ignoreSslErrors: false,
url: jiraApiServer + entry,
httpMode: method,
requestBody: method.toUpperCase() == 'GET' ? null : (bodyObj ? JsonOutput.toJson(bodyObj) : null),
contentType: 'APPLICATION_JSON',
consoleLogResponseBody: false,
validResponseCodes: requestAcceptCodes()
)

Like Zhishang Zheng likes this
Zhishang Zheng February 18, 2025

@bmcalary , thanks for the info, I'll update code to not pass in the "requestBody" parameter for get requests first, and check further request results.

Zhishang Zheng February 18, 2025

@bmcalary , we've checked our code, it turns out we indeed pass in an empty string as body within js. Our groovy public method will call that js code, then eventually cause the 403 issue.

We've updated the js code to not pass in any body in case of a GET request, so far so good.

You're a life saver, thank you so much!

bmcalary
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2025

Nice find. Great work.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events