import { SavedObjectsErrorHelpers } from '../../../../../src/core/server' ; import { isErrorWithReason } from './error_with_reason' ; export function isAlertSavedObjectNotFoundError ( err , alertId ) { const actualError = isErrorWithReason ( err ) ? err . error : err ; return ( SavedObjectsErrorHelpers . isNotFoundError ( actualError ) && `${ actualError }` . includes ( alertId ) ) ; }