Closed leemrw closed 4 years ago
anything other than a 204 response (success) will result in a promise rejection.
You can then inspect the reason via err.statusCode
return jira.deleteIssue('SOMEINCORRECTISSUE-123') .then(function() { console.log('delete was successful'); }).catch(function(err) { console.error('delete failed. code: ' + err.statusCode); });
As I call deleteIssue I have been trying to examine the return value. The issues are deleted but node-jira-client returns 'undefined'
Am I missing where you document the return values? The Jira docs say their REST interface return a 204, 400, 401, 402, 403 or 404. Is there any way for me to examine the response codes?