message: added sleep for 503 responses
diff: @@ -398,13 +398,19 @@ exports.OAuth.prototype._performSecureRequest = function(oauth_token, oauth_toke
  callbackCalled = true;
  if (response.statusCode >= 200 && response.statusCode <= 299) {
  callback(null, data, response);
  - } else {
  - // Follow 301 or 302 redirects with Location HTTP header
  - if ((response.statusCode == 301 || response.statusCode == 302) && clientOptions.followRedirects && response.headers && response.headers.location) {
  + } else if ((response.statusCode == 301 || response.statusCode == 302) && clientOptions.followRedirects && response.headers && response.headers.location) {
  self._performSecureRequest(oauth_token, oauth_token_secret, method, response.headers.location, extra_params, post_body, post_content_type, callback);
  - } else {
  - callback({ statusCode: response.statusCode, data: data }, data, response);
  - }
  + } else if (response.statusCode == 503) {
  + const sleep = (seconds) => {
  + return new Promise((resolve, reject) => {
  + setTimeout(resolve, (seconds * 1000));
  + });
  + };
  +
  + //Request needs to be retried after a short pause
  + sleep(1).then(function() {
  + self._performSecureRequest(oauth_token, oauth_token_secret, method, path, extra_params, post_body, post_content_type, callback);
  + })
  }
  }
  }
  