I found in my testing that undici may surface the cause property as an Error rather than as a plain string. This meant this if block never got executed and we never bubbled up the actual cause.
After the change?
Correctly handle cause as an Error or as a string, and bubble up the message from the Error, if present.
Pull request checklist
[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been reviewed and added / updated if needed (for bug fixes / features)
Resolves #644
Before the change?
I found in my testing that undici may surface the
cause
property as an Error rather than as a plain string. This meant this if block never got executed and we never bubbled up the actual cause.After the change?
Correctly handle
cause
as an Error or as a string, and bubble up the message from the Error, if present.Pull request checklist
Does this introduce a breaking change?