You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Interceptor callback exceptions can turn successful fetches into rejections #6
The fetch interceptor currently calls matcher and onIntercept directly in the request path. If either callback throws, the original fetch() call rejects even when the network request itself succeeded.
That makes interception logic capable of breaking application behavior.
Current behavior
A successful response can be converted into a rejected fetch() promise when user-supplied interception code throws.
Expected behavior
Interception should be observational by default. Callback failures should not change the success or failure of the original fetch() unless the library explicitly documents that behavior.
Impact
Logging or analytics code can break production requests
Consumers have to wrap every callback defensively to avoid changing network semantics
The library is not transparently safe to enable around existing code
Suggested acceptance criteria
Exceptions thrown by matcher or onIntercept do not reject a successful fetch() call
Failure handling behavior is documented
Tests cover callback exceptions for both matcher and interception callbacks
Activity
Merge pull request #7 from hsblabs/codex/issue-6-safe-callback-errors