Browse Source

Fix unwanted bails

master
Tony Kovanen 9 years ago
parent
commit
5d37847b08
  1. 4
      lib/index.js

4
lib/index.js

@ -88,7 +88,7 @@ export default class Now extends EventEmitter {
if (this._debug) console.timeEnd('> [debug] /create');
// no retry on 4xx
if (400 <= res.status && 500 > res.status) {
if (200 !== res.status && (400 <= res.status && 500 > res.status)) {
if (this._debug) {
console.log('> [debug] bailing on creating due to %s', res.status);
}
@ -141,7 +141,7 @@ export default class Now extends EventEmitter {
if (this._debug) console.timeEnd(`> [debug] /sync ${name}`);
// no retry on 4xx
if (400 <= res.status || 500 > res.status) {
if (200 !== res.status && (400 <= res.status || 500 > res.status)) {
if (this._debug) console.log('> [debug] bailing on creating due to %s', res.status);
return bail(responseError(res));
}

Loading…
Cancel
Save