Forums

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

Jira Automation's "Send web request" to GitHub endpoint throwing 404 error. It was working earlier.

Bikram Agarwal October 19, 2023

I am working on creating an automation rule in Jira. When an issue transitions from "In Progress" to "QA Ready", send web request to GitHub to create a PR. 

 

Rules.png

This rule was working till an hour ago. But suddenly this rule has started throwing 404 error, without any change in the rule. 

 

Headers (3)

Authorization: **************************

X-GitHub-Api-Version: 2022-11-28

Accept: application/vnd.github+json

Payload
{
  "title": "BZAP-21313: PR to QA",
  "body": "PR auto-created from Jira",
  "head": "feature/BZAP-21313",
  "base": "qa"
}

 

Response

404 Not Found
Headers (21)

Server: GitHub.com

Content-Type: application/json; charset=utf-8

Transfer-Encoding: chunked

X-GitHub-Media-Type: github.v3; format=json

x-github-api-version-selected: 2022-11-28

X-RateLimit-Limit: 60

X-RateLimit-Remaining: 54

X-RateLimit-Reset: 1697742902

X-RateLimit-Used: 6

X-RateLimit-Resource: core

Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset

Access-Control-Allow-Origin: *

Strict-Transport-Security: max-age=31536000; includeSubdomains; preload

X-Frame-Options: deny

X-Content-Type-Options: nosniff

X-XSS-Protection: 0

Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin

Content-Security-Policy: default-src 'none'

Vary: Accept-Encoding, Accept, X-Requested-With

X-GitHub-Request-Id: REDACTING

Payload
{
  "message": "Not Found",
  "documentation_url": "https://docs.github.com/rest/pulls/pulls#create-a-pull-request"
}

 

The org and repo exists. The head and base branch exists. The user has read/write access to the repo. And as you can see in response header, it is not a rate-limit issue either. 

In postman, when I use the same request payload to the same request endpoint url using the same headers, that succeeds. It's throwing 404 only in Jira. 

 

Any tips on how to troubleshoot / fix this?

 

EDIT - 

I changed the authentication to another user's token and then the rule started working. I changed the authentication back to the original user I had at first and the rule is still working now. What just happened here? Now it makes me think the Jira automation will suddenly start throwing 404 for no reason in future too. 

2 answers

1 accepted

0 votes
Answer accepted
Bikram Agarwal October 31, 2023

Turned out when I copy a rule to create another, even though the "authorization" field shows *******, making me think it has copied over the authorization too; turns out that's not true. The auth doesn't get copied over in the copied rule. That's what was causing the 404 and it was going away when I was editing the auth with either token.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 31, 2023

Wow, that is good to know.

Yet another reason for better validation of rules before publish succeeds: if the copy cleared some fields of the Send Web Request, it should fail to publish, preventing this symptom.  That could be part of this suggestion I made a while ago: https://jira.atlassian.com/browse/AUTO-170

Like Bikram Agarwal likes this
0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 21, 2023

Hi @Bikram Agarwal -- Welcome to the Atlassian Community!

As this is an intermittent problem, with essentially an unchanged rule, I recommend working with your Jira site admin to submit a ticket to Atlassian Support here: https://support.atlassian.com/contact/#/

They may see something in their internal logging which is not visible to us customers.  When you hear back from them, please post what you learn to benefit the entire community.  Thanks!

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events