Closed rexpan closed 10 months ago
I can confirm that I am experiencing the bug myself, would appreciate this being resolved.
@tatianajiselle I left a comment on #3377 trying to answer all three streams of this discussion, but basically, I don't consider this a bug or missing feature right now, and instead, would recommend to write a fetch
wrapper and pass that to the Client
. There's a further explanation in the issue's comment, but I wouldn't consider using the AbortSignal
that's passed in as more useful or more correct, given that it isn't more practical than either a custom exchange or a fetch
wrapper, and also isn't a practical public API
Edit: Also, to clarify, I wasn't sure whether the original issue in #3377 and the Discord thread were from the same team, so I assumed as much given the timing 😅 But apologies if they're not
all good! moving convo to #3377 for simplicity
As per the conversation in #3377, since signal
is not part of the public API (1) because HTTP is not assumed and hence fetchOptions
is limited, and (2) since it's not expected to set up a timeout or otherwise pass an AbortSignal
in the UI layer to the Client
, what this change adds is not expected to work.
Resolves #3377
Summary
The
signal
passed fromfetchOptions
by user be ignored and overrided.Set of changes
Listen to
abort
event from user passedsignal
and abort the current request.