Forums

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

Send Web Request Error 500

SGC Associates Ltd
Contributor
December 30, 2024

 

 

Request on CURL

curl -X POST -H "Content-Type: application/json" -d "{\"message\":\"Help What do I do now\"}" https://<mydomain>:7990/<directory>

The request works fine to flask / Python with CURL and Postman 

Tried IssueData / Custom etc

Header   content-type : application/json

( which it is correctly formatted )

Server is Flask on Python ( correct SSL certs, not that )

As above works fine on CURL / Postman and can even web browse if allow GET

Firewall OK, Tested and can see it passing

Always get the error when using SEND WEB REQUEST on Jira

 

Send web request
Unable to publish the web request - received HTTP status response:
500
Error found in the HTTP body response:

 

FYI

Flask is accessible from Jiras servers and is not blocked by  firewall rules

SSL Certs good, I have bought them and work with CURL, Postman and Chrome ( on Get )

 

 

CURL and Postman work without issue

If I try the https SEND WEB REQUEST I get a 500 error ( Not from Flask )

If I change that to HTTP, then save I get the same error ( but 502 and with a Squid error )

Which says to me the fault is with Jira/Atlassian

( Squid is doing something funky as middleware )

Unfortunately, Only Atlassian can supply a solution to this issue

1 answer

0 votes
Tuncay Senturk
Community Champion
December 30, 2024

Hi @SGC Associates Ltd 

I assume you are using Automation's Send Web Request. Since your Flask server works fine with curl, Postman, and even via browsing, you've ruled out the firewall and SSL problems and this is weird. I think you already checked the headers (content-type: application/json, etc) and the json body is well-formed, and you are not using basic auth.

The error is 500 meaning that it's server error not the client or URL. Any chance to trace th flask logs in detail?

SGC Associates Ltd
Contributor
December 30, 2024

Correct on all 

Works flawlessly with CURL and Postman

Checked firewall, SSL ( bought specifically for this ), headers ( set at application/json )

Not using basic auth

It does not hit Flask as I have extensive debugging enabled and nothing,

but with CURL, Postman etc I can see results in debug log / print and can capture initial connection.

My understanding is that Atlassian/Jira uses Squid as middleware for their AWS platform and I believe this is the issue

Many Thanks

Tuncay Senturk
Community Champion
December 30, 2024

Yeah, it might be the case. 

Did you try adding some logs to see how it behaves with data in and out? something like :


try:
   print("Headers:", request.headers)
   print("Body:", request.data.decode('utf-8'))
   print("JSON:", request.get_json())
   return "Request received successfully", 200
except Exception as e:
   print("Error processing request:", str(e))
   return "Server error", 500

 

SGC Associates Ltd
Contributor
December 30, 2024

Tried that as part of debugging, but tried again

Got same result

Nothing at all on the server, not even a connection

Error on Jira is

Unable to publish the web request - received HTTP status response
500
Error found in the HTTP body response

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events