GeezerVison is showing github.com — fix: response error interceptor broken by luddd3 · Pull Request #3805 · nodejs/undici
Conversation
luddd3
commented
Nov 6, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
This relates to...
The response-error interceptor
Rationale
The interceptor is currently broken since Request no longer accepts throwOnError as an option.
Changes
- Expose the interceptor in the same manner as the others.
- Remove
throwOnError as it is considered an invalid argument.
- Removed broken/incomplete tests
Features
Bug Fixes
Breaking Changes and Deprecations
Status
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Expose the interceptor in the same manner as the others.
Remove `throwOnError` as it is considered an invalid argument.
Comment on lines
+88
to
+92
|
|
return (dispatch) => {
|
|
|
return function Intercept (opts, handler) {
|
|
|
return dispatch(opts, new ResponseErrorHandler(opts, { handler }))
|
|
|
}
|
|
|
}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this makes me having stomach ache
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Care to elaborate or give a suggestion?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@metcoder95
When we are already touching this file massively, should we extract the handler into a new file and put it into the handler folder?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
It depends on what we do with that handler.
If the handler remains used within the interceptor only, let's keep it close to it; otherwise, let's add it into a separate handler file for easier management.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Dec 16, 2024
Reviewers
Uzlopak
Uzlopak left review comments
mcollina
mcollina approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|