fix(fetchium): Replace AbortSignal APIs unavailable on Hermes - #7
Merged
Merged
Conversation
`withRetry` called `signal.throwIfAborted()` which doesn't exist on Hermes (React Native's JS engine), causing a TypeError that the retry loop silently swallowed and retried until exhaustion, so no network request was ever made. `signal.reason` is also undefined on Hermes, meaning abort rejections carried no error info. Replace `throwIfAborted()` with a manual `signal.aborted` check and extract a `getAbortReason()` helper that falls back to an AbortError when `signal.reason` is unavailable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pzuraq
approved these changes
Apr 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
withRetry()calledsignal.throwIfAborted()which doesn't exist on Hermes (React Native's JS engine). The resultingTypeErrorwas caught by the retry loop, treated as a transient failure, and retried with backoff until exhaustion. No network request was ever made.signal.reasonis alsoundefinedon Hermes, so abort rejections insleep()carried no error information.throwIfAborted()with a manualsignal.abortedcheck and extracted agetAbortReason()helper that falls back to anAbortErrorwhensignal.reasonis unavailable. The fallback also handles engines whereDOMExceptionis not globally defined.Test plan
tsc --noEmit)🤖 Generated with Claude Code