fix: do not throw unhandled exception when data is undefined in interceptor.reply#4036
fix: do not throw unhandled exception when data is undefined in interceptor.reply#4036mcollina merged 3 commits intonodejs:mainfrom
Conversation
|
CI seems failing |
|
I am not sure the CI failure relates to my changes? Or at least, it isn't clear for me that it would. Any pointers? |
|
Failures seems unrelated, are the same ones failing in other PRs (e.g. #4044) |
|
Hey @mcollina and @metcoder95, is there anything I can do to help progress this PR? |
|
It seems windows CI is utterly broken. I'm not keen on landing any changes until that's sorted, and I haven't had time yet. |
|
No worries at all. I entirely understand and I am not rushed in getting this out (we have worked around the behavior in our code-base, and don't need this change to unblock ourselves. I mainly just wanted to solve this for others that may encounter it). Just trying to follow up. Take your time, I might drive by to follow up a few times, with no bad intentions to put any kind of pressure to land this, I entirly understand and appreciate you even willing to put the time to look into this eventually. |
* nodejs/main: (23 commits) Bumped v7.5.0 (nodejs#4091) Removed clients with unrecoverable errors from the Pool (nodejs#4088) feat: Allow disabling autoSelectFamily in an Agent (nodejs#4070) chore: update cache tests (nodejs#4027) fix: Fix retry-handler.js when retry-after header is a Date (nodejs#4084) feat: add mock call history to access request configuration in test (nodejs#4029) feat(docs): button to switch dark and light mode (nodejs#4044) Bumped v7.4.0 (nodejs#4071) fix: fix EnvHttpProxyAgent for the Node.js bundle (nodejs#4064) chore: update WPT (nodejs#4062) chore: update WPT (nodejs#4028) fix: handle missing vary header values (nodejs#4031) fix: do not throw unhandled exception when data is undefined in interceptor.reply (nodejs#4036) test: fix windows wpt (nodejs#4050) feat: mark `EnvHttpProxyAgent` as stable (nodejs#4049) don't check AbortSignal maxListeners on some node versions (nodejs#4045) feat(docs): copy to clipboard button (nodejs#4037) docs: fix incorrect method signature of `onResponseError` (nodejs#4030) docs: document about global dispatcher and errors (nodejs#3987) (nodejs#4014) chore: update WPT (nodejs#4011) ...
This relates to...
N/A
Rationale
See below (Bug Fixes)
Changes
See below (Bug Fixes)
Features
N/A
Bug Fixes
When interceptor.reply would return
{ data: undefined }, it blows up ingetResponseData:This got introduced here, more specifcally, this change
More specifically, in the before and after, data is not the same when it was undefined originally:
vs
As previously, when data was undefined,
''would be passed togetResponseData, andgetResponseDatawould return'', I ensured we now also return''whendatabeing passed togetResponseDataisundefined.Breaking Changes and Deprecations
N/A
Status