Skip to content

Commit

Permalink
Change actionable errors to warnings. (#3234)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkppr authored Nov 28, 2024
1 parent cbefa31 commit 739a905
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ export default {
let msg = 'Sorry, there was a problem fetching your search results. Error: "'+ e.response.data.message +'"'
if (e.response.data.message.includes('too_many_nested_clauses')) {
msg = 'Sorry, your query is too complex. Use field-specific search (like "message:(<query terms>)") and try again.'
this.errorSnackBar(msg)
this.warningSnackBar(msg)
} else {
this.errorSnackBar(msg)
}
Expand Down
6 changes: 6 additions & 0 deletions timesketch/frontend-ng/src/mixins/snackBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ Vue.mixin({
snackbar.color = "error"
this.$store.dispatch('setSnackBar', snackbar)
},
warningSnackBar(message) {
let snackbar = defaultSnackBar
snackbar.message = message
snackbar.color = "warning"
this.$store.dispatch('setSnackBar', snackbar)
},
infoSnackBar(message) {
let snackbar = defaultSnackBar
snackbar.message = message
Expand Down

0 comments on commit 739a905

Please sign in to comment.