From 815533639345c56cc08b1c8489681b0aa9044471 Mon Sep 17 00:00:00 2001 From: Ignacio Rivas Date: Wed, 15 Dec 2021 12:00:34 +0200 Subject: [PATCH] Lets match against the error containing the missing repository instead of the full message --- .../components/overview/backup_step/cloud_backup.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/backup_step/cloud_backup.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/overview/backup_step/cloud_backup.tsx index c651bf51f294d..2ecd2a7673589 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/overview/backup_step/cloud_backup.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/overview/backup_step/cloud_backup.tsx @@ -21,9 +21,9 @@ import { EuiCallOut, } from '@elastic/eui'; +import { CLOUD_SNAPSHOT_REPOSITORY } from '../../../../../common/constants'; import { useAppContext } from '../../../app_context'; import { ResponseError } from '../../../../../common/types'; -import { CLOUD_SNAPSHOT_REPOSITORY } from '../../../../../common/constants'; import { uiMetricService, UIM_BACKUP_DATA_CLOUD_CLICK } from '../../../lib/ui_metric'; interface Props { @@ -33,7 +33,7 @@ interface Props { } const isMissingFoundSnapshotsRepo = (error: ResponseError) => { - return error.statusCode === 404 && error.message === `[${CLOUD_SNAPSHOT_REPOSITORY}] missing`; + return error.statusCode === 404 && error.message.toString().includes(CLOUD_SNAPSHOT_REPOSITORY); }; export const CloudBackup: React.FunctionComponent = ({