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
This doesn't seem to happen for every request; I suspect it might have something to do with the response body size. I tried a couple small public JSON API demos before I landed on a GraphQL endpoint that reproduced the behavior.
Under certain conditions, simply including an afterResponse hook causes the response Promise to hang. The hook doesn't have to do anything; it can be a no-op function or just return the same cloned response. Removing the hook causes it to start working. Switching to node-fetch also works fine.
I wonder if the hook causes the response to be cloned and therefore the Promise as well, making one of them never resolve? Just a thought.
The text was updated successfully, but these errors were encountered:
Here's a simple repro: https://github.com/exogen/ky-afterResponse-repro
This doesn't seem to happen for every request; I suspect it might have something to do with the response body size. I tried a couple small public JSON API demos before I landed on a GraphQL endpoint that reproduced the behavior.
Under certain conditions, simply including an
afterResponse
hook causes the response Promise to hang. The hook doesn't have to do anything; it can be a no-op function or just return the same cloned response. Removing the hook causes it to start working. Switching tonode-fetch
also works fine.I wonder if the hook causes the response to be cloned and therefore the Promise as well, making one of them never resolve? Just a thought.
The text was updated successfully, but these errors were encountered: