-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(interceptors): migrate decorator handler to new hooks #3905
Conversation
assert(!this.#onErrorCalled) | ||
|
||
return this.#handler.onBodySent?.(...args) | ||
onResponseError (...args) { |
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.
I believe we should introduce a new hook to handle pre-request or in-flight request errors (e.g. network timeouts after connect, or runtime errors before connecting with remote peer); it feels quite odd handling these kind of errors through onResponseError
when the response has not even being received
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.
onRequestError
?
Will adjust the tests for the decorator |
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.
I'm thinking whether we should just deprecate/remove this?
What exactly? The methods? Definitely. But we can aim to land this one to at least unlock the interceptors, and create a further PR to drop them |
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.
lgtm
This relates to...
Rationale
Changes
Features
Bug Fixes
Breaking Changes and Deprecations
Status