The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

"read ECONNRESET" error when attempting to call API using httpClient.

Raja Deshapu
February 10, 2022
const ISSUE_TYPE_PATH = '/rest/api/2/issuetype';
addon.on('host_settings_saved', function (clientKey, settings) {
var httpClient = addon.httpClient({
clientKey: clientKey,
addonKey: addon.key
});

 

var issuTypeIds = [];
var url = ISSUE_TYPE_PATH;

 

httpClient.get({
uri: url,
async: false
}, function (err, response, data) {
if (err) {
console.log("Error retrieving issue types: " + err);
} else {
console.log("request returns " + response.statusCode);
if (response.statusCode == 200) {
var data = JSON.parse(data);
}
}
});
});

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Raja Deshapu
March 8, 2022

any update?

TAGS
AUG Leaders

Atlassian Community Events