-
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
[ML] Ensure Anomaly Explorer and Single View do not hang by fixing TypeError: finally is not a function #25961
[ML] Ensure Anomaly Explorer and Single View do not hang by fixing TypeError: finally is not a function #25961
Conversation
Pinging @elastic/ml-ui |
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
💚 Build Succeeded |
@@ -264,7 +264,8 @@ module.controller('MlExplorerController', function ( | |||
|
|||
// Populate the map of jobs / detectors / field formatters for the selected IDs. | |||
mlFieldFormatService.populateFormats(selectedIds, getIndexPatterns()) | |||
.finally(() => { | |||
.catch((err) => { console.log('Error setting selected jobs:', 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.
Can you change this error message to say Error populating field formats
. The jobs will be selected ok, it's just actual
and typical
values will be formatted using the default numeric formatting rather than e.g. as bytes, if a formatter has been applied for that field.
.finally(() => { | ||
// Load the data - if the FieldFormats failed to populate | ||
// the default formatting will be used for metric values. | ||
.catch((err) => { console.log('Error loading job:', 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.
As above, this error should say Error populating field formats
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
💔 Build Failed |
retest |
💚 Build Succeeded |
…peError: finally is not a function (elastic#25961) * Replace finally with catch/then to fix typeError * update error messages
Summary
Replaces calls to
finally
which is not supported (as we move away from Angular) withcatch
andthen
to fixTypeError: finally not a function
error and preventLoading...
hang due to this error..finally
call inexplorer_controller.js
.finally
call intimeseriesexplorer_controller.js
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] Unit or functional tests were updated or added to match the most common scenarios- [ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
- [ ] This was checked for breaking API changes and was labeled appropriately- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately