Skip to content

Commit 88e792b

Browse files
committed
Added a check for when the body variable is undefined. This is triggered when many requests are submitted in quick succession and the Jira server doesn't return a valid response. The request should be retried if this error is thrown.
1 parent e98573b commit 88e792b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/jira.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ var JiraApi = exports.JiraApi = function(protocol, host, port, username, passwor
184184
return;
185185
}
186186

187+
if (body === undefined) {
188+
callback('Response body was undefined.');
189+
}
190+
187191
callback(null, JSON.parse(body));
188192

189193
});

0 commit comments

Comments
 (0)