Forums

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

Getting error code as zero from jira server rest api

gowtham mahes March 15, 2022

Hi Team,

Currently, I am trying to integrate the Jira server rest API to my angular application for creating issues.

But when i try to hit the create issue api from my angular app i am getting cors error and getting status code as zero and status text as unknown error.

 

My angular app url : http://localhost:4000

Jira create issue rest api : https://XXXX/jira/rest/api/2/issue/

kindly help me for this

1 answer

0 votes
Nic Brough -Adaptavist-
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.
March 15, 2022

This sounds like you have a networking issue between your system and your Jira.  Or that the call you are making is wrong somehow (a Cors error could be a network issue or a malformed request).  It's also possible that running your application on "localhost" is a problem because that means "this machine" and limits networking.

Could you tell us what the actual error is, and what call your app is making to Jira?

gowtham mahes March 15, 2022

Thanks for your help.
please find the error snap below

Error Jira.PNG

gowtham mahes March 15, 2022

I have developed one angular application in that i have called the jira server create issue rest api for creating issues. 

When try with same url , headers, and body in postman i am able to get the success response and issue got created.

Have deployed the angular app in iis server but still getting the same cors error
i read some articel saying to enable oauth for connecting the jira rest api from external appplication. or do i need to add my angular app url in jira whitelist?

Suggest an answer

Log in or Sign up to answer