@goodandready/dsh-subscriptions 0.5.26 → 0.5.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/rotate.js CHANGED
@@ -10,6 +10,7 @@ const SWITCH_CODES = new Set([
10
10
 
11
11
  export function isSwitchableError(err) {
12
12
  if (!err || typeof err !== 'object') return false
13
+ if (err.name === 'AbortError' || err.code === 'ABORT_ERR' || err.code === 'ERR_ABORTED' || (err.message && /aborted/i.test(err.message))) return false
13
14
  const code = err.code || (err.failure && err.failure.code)
14
15
  if (SWITCH_CODES.has(code)) return true
15
16
  const status = err.status || err.statusCode