fixed console errors in the ui for ElasticSearchReIndexPage (#10982)

This commit is contained in:
Aniket Katkar 2023-04-10 23:29:22 +05:30 committed by GitHub
parent b3e7919c92
commit 0bbcfc5b3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,11 +75,13 @@ const ElasticSearchIndexPage = () => {
}; };
const stopBatchReIndexedJob = async () => { const stopBatchReIndexedJob = async () => {
try { if (batchJobData) {
const response = await stopBatchJobReIndex(batchJobData?.id); try {
showSuccessToast(jsonData['api-success-messages']['stop-re-index']); await stopBatchJobReIndex(batchJobData.id);
} catch (error) { showSuccessToast(jsonData['api-success-messages']['stop-re-index']);
showErrorToast(error as AxiosError); } catch (error) {
showErrorToast(error as AxiosError);
}
} }
}; };