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
The following code in makeRequest coerces undefined to the string "undefined" when it's explicitly passed to the fetch options:
// 23. If init["integrity"] exists, then set request’s integrity metadata to it.
if ('integrity' in init) {
request.integrity = String(init.integrity)
}
Arch Linux, Node 16, server-side call (not coming from a browser)
Additional context
I ran into this while implementing a custom fetcher function for Apollo Client. Because the typings for browser/native fetch don't match unidci's fetch, I had to manually map some parameters over. It's pretty easy to workaround this by testing for a falsy value and passing an empty string if needed ({ integrity: req.integrity || ''}), but it did result in a pretty cryptic error message:
Unknown server error Error: fetch failed
In my case, I believe my need to map stuff manually between the two implementations is actually related to #1172.
The text was updated successfully, but these errors were encountered:
Bug Description
The following code in
makeRequest
coercesundefined
to the string"undefined"
when it's explicitly passed to the fetch options:Reproducible By
Expected Behavior
Undefined is not coerced to a string
Logs & Screenshots
Environment
Arch Linux, Node 16, server-side call (not coming from a browser)
Additional context
I ran into this while implementing a custom
fetcher
function for Apollo Client. Because the typings for browser/native fetch don't match unidci's fetch, I had to manually map some parameters over. It's pretty easy to workaround this by testing for a falsy value and passing an empty string if needed ({ integrity: req.integrity || ''}
), but it did result in a pretty cryptic error message:In my case, I believe my need to map stuff manually between the two implementations is actually related to #1172.
The text was updated successfully, but these errors were encountered: