fix: clarify TypeError order dependency in error classifier

Address Greptile review: add comment noting that TypeError('fetch failed')
is already handled by transport patterns before the instanceof check.
This commit is contained in:
Rod Boev
2026-02-10 17:46:28 -05:00
parent 7ffa1b06ee
commit 22683f6910
-1
View File
@@ -54,7 +54,6 @@ export function isWorkerUnavailableError(error: unknown): boolean {
// HTTP 4xx client errors — our bug, NOT worker unavailability
if (/failed:\s*4\d{2}/.test(message) || /status[:\s]+4\d{2}/.test(message)) return false;
// Programming errors — code bugs, not worker unavailability
// Programming errors — code bugs, not worker unavailability
// Note: TypeError('fetch failed') already handled by transport patterns above
if (error instanceof TypeError || error instanceof ReferenceError || error instanceof SyntaxError) {