Skip to content

Commit

Permalink
fix: gracefully handle exceptions related to config index not created
Browse files Browse the repository at this point in the history
Signed-off-by: vikhy-aws <[email protected]>
  • Loading branch information
vikhy-aws committed Dec 21, 2024
1 parent 3f98a83 commit bed0821
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@babel/plugin-transform-modules-commonjs": "^7.22.9",
"@elastic/elastic-eslint-config-kibana": "link:../../packages/opensearch-eslint-config-opensearch-dashboards",
"@elastic/eslint-import-resolver-kibana": "link:../../packages/osd-eslint-import-resolver-opensearch-dashboards",
"cypress": "12.17.4",
"cypress": "9.5.4",
"husky": "^8.0.0",
"lint-staged": "^10.2.0",
"@types/react": "^16.14.23"
Expand Down Expand Up @@ -67,6 +67,5 @@
},
"engines": {
"yarn": "^1.21.1"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,9 @@ class ConfigureActions extends React.Component {
type: toChannelType(destination.type),
description: '',
}));
} else {
// If the config index is not created, don't show the notification
if (response.totalMonitors !== 0) {
} else if (response.totalMonitors !== 0) {
// If the config index is not created, don't show the notification
backendErrorNotification(notifications, 'load', 'destinations', response.err);
}
}

let channels = await this.getChannels();
Expand Down

0 comments on commit bed0821

Please sign in to comment.