-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix regression in CallClient, which caused request errors like timeouts to result in fatal errors #22558
Fix regression in CallClient, which caused request errors like timeouts to result in fatal errors #22558
Conversation
…ts to result in fatal errors.
@@ -183,17 +183,18 @@ export function CallClientProvider(Private, Promise, es) { | |||
} | |||
}); | |||
|
|||
// If there are any errors, notify the searchRequests of them. | |||
defer.promise.catch((err) => { |
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.
By returning the original defer.promise
instead of the result of calling defer.promise.catch()
, we created two parallel promise chains which would both catch the same error. By returning the result of defer.promise.catch()
, we preserve the single promise chain, allowing us to prevent errors from reaching the consumer (fetch_now.js
). The consumer creates fatal errors in response to rejected promises.
💔 Build Failed |
Looks like the
|
Retest |
💚 Build Succeeded |
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.
Great job tracking this one down. This one has hard to pinpoint.
lgtm
code review, tested changes and verified that problem has been resolved.
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
…ts to result in fatal errors. (elastic#22558)
Fixes #22466, a regression introduced into 6.4.0 by #20497.