cyboard-bamboo-widgets
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "cyboard-bamboo-widgets", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Cyboard widgets for Atlassian Bamboo", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -86,2 +86,3 @@ var events = require('events'), | ||
request(options, function(error, response, body) { | ||
if (error) { | ||
@@ -91,2 +92,6 @@ return deferred.reject(error); | ||
if(response.statusCode !== 200) { | ||
return deferred.reject('Error ' + response.statusCode + ': ' + response.statusMessage); | ||
}; | ||
try { | ||
@@ -93,0 +98,0 @@ var builds = JSON.parse(body).builds; |
@@ -20,4 +20,6 @@ var request = require('request'), | ||
var message = JSON.parse(body).message | ||
} catch (e) {} | ||
return deferred.reject(message || response.statusMessage); | ||
} catch (e) { | ||
return deferred.reject('Error ' + response.statusCode + ': ' + response.statusMessage); | ||
} | ||
return deferred.reject(message); | ||
} | ||
@@ -24,0 +26,0 @@ |
15620
241