Skip to content

Commit

Permalink
fixing issue when iTunes Connect goes offline and empty response obje…
Browse files Browse the repository at this point in the history
…cts are received.
  • Loading branch information
Simon McClive authored and Simon McClive committed Jun 3, 2015
1 parent 01c0bbc commit 1dd0f40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ Connect.prototype.executeRequest = function(task, callback) {
'Cookie': this._cookies
}
}, function(error, response, body) {
if(response.statusCode == 401) {
if(!response.hasOwnProperty('statusCode')){
error = new Error('iTunes Connect is not responding. The service may be temporarily offline.');
body = null;
}else if(response.statusCode == 401) {
error = new Error('This request requires authentication. Please check your username and password.');
body = null;
}
Expand Down

0 comments on commit 1dd0f40

Please sign in to comment.