(err: unknown)
| 60 | // AbortError with no identifiable cause, timeout-flavored aborts, |
| 61 | // arbitrary Error instances) returns false and gets `status=error`. |
| 62 | export function isExplicitUserStopError(err: unknown): boolean { |
| 63 | if (err == null) return false |
| 64 | if (typeof err === 'string') return isExplicitStopReason(err) |
| 65 | if (typeof err === 'object') { |
| 66 | const e = err as { cause?: unknown; message?: unknown } |
| 67 | if (isExplicitStopReason(e.cause)) return true |
| 68 | if (typeof e.message === 'string' && isExplicitStopReason(e.message)) return true |
| 69 | } |
| 70 | return false |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * True iff an HTTP response status code represents a real server-side |
no test coverage detected