|
|
@ -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)); |
|
|
|
} |
|
|
|