-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Log error when "Export All" ES query fails #6976
Conversation
jenkins, test it |
$scope.exportAll = () => Promise.map($scope.services, service => service.service | ||
.scanAll('') | ||
.then(results => results.hits.map(hit => _.extend(hit, { type: service.type }))) | ||
.catch(error => notify.error(error)) |
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.
This actually results in three different error blocks in the "more info" section of the error banner. I assume because there are three services or something, though I'm not familiar enough with this feature to say for certain. Perhaps the notify behavior should be moved to a .catch() on the .map() promise instead?
@epixa There! |
LGTM |
I'm confused. On master I already get the toast message |
@LeeDr This ensures that if the request to the API fails for some reason (e.g a malformed request or failure to produce a response), an error notification appears in the developer It originally arised from |
I don't like adding an error notification to the dev console, and not showing a toast message to the user. Maybe I'm still not understanding this PR. I'd like to zoom about it, maybe with @epixa when we're all available. |
@LeeDr: The errors do appear in the toast message. You should be able to verify this by adding |
LGTM |
Related: #6774 #6776.
@epixa: This PR is cleaner.