fix: emitting unknown error event #3763
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This relates to...
Might fix #3753
related to #3011 as well, since the fix of that one added
errorRequest
through #3057 and fix another issueRationale
This should fixes the following error, but I'm not sure if it's fine console.error this error or if we expect something else. Also I wonder wether we should check in the first place if request exist before accessing it, or this is expected to be catched in that case.
Let me know if we would like to handle that another way.
We are using undici dispatcher with pool client and this error occur.
This is occurring because when the
onError
fromerrorRequest
in utils is called, then if request is undefined it got caught by the try catch and then we try to emit an error, but it seems emit does not expect such event.Undici v6.20.1
Bug Fixes
should close #3753
Breaking Changes and Deprecations
Status