From 626c3349affc5c02e85a905fd7dc03aec3135cc7 Mon Sep 17 00:00:00 2001 From: Yizhe Liu Date: Mon, 24 Aug 2020 20:57:15 -0700 Subject: [PATCH 1/2] Add action item and message for init failue case due to invalid search query. Issue:#218 --- public/pages/DetectorDetail/utils/constants.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/pages/DetectorDetail/utils/constants.ts b/public/pages/DetectorDetail/utils/constants.ts index 890855fd..58d8af05 100644 --- a/public/pages/DetectorDetail/utils/constants.ts +++ b/public/pages/DetectorDetail/utils/constants.ts @@ -67,6 +67,13 @@ export const DETECTOR_INIT_FAILURES = Object.freeze({ cause: 'the detector is not defined', actionItem: 'Define your detector and try again.', }, + INVALID_FEATURE_QUERY: { + // TODO: https://github.com/opendistro-for-elasticsearch/anomaly-detection/issues/218 + //https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/master/src/main/java/com/amazon/opendistroforelasticsearch/ad/constant/CommonErrorMessages.java#L28 + keyword: 'Invalid search query', + cause: 'there exists invalid custom feature aggregation query', + actionItem: 'Revise your custom feature aggregation query and try again.', + }, UNKNOWN_EXCEPTION: { //https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/development/src/main/java/com/amazon/opendistroforelasticsearch/ad/transport/AnomalyResultTransportAction.java#L438 keyword: 'We might have bugs', From 78fbc93f78b10d5d7817f7bafbcabd333db5a5f2 Mon Sep 17 00:00:00 2001 From: Yizhe Liu Date: Wed, 26 Aug 2020 16:54:12 -0700 Subject: [PATCH 2/2] Confirmed wording with tech writer --- public/pages/DetectorDetail/utils/constants.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/pages/DetectorDetail/utils/constants.ts b/public/pages/DetectorDetail/utils/constants.ts index 58d8af05..9670aa2c 100644 --- a/public/pages/DetectorDetail/utils/constants.ts +++ b/public/pages/DetectorDetail/utils/constants.ts @@ -71,8 +71,9 @@ export const DETECTOR_INIT_FAILURES = Object.freeze({ // TODO: https://github.com/opendistro-for-elasticsearch/anomaly-detection/issues/218 //https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/master/src/main/java/com/amazon/opendistroforelasticsearch/ad/constant/CommonErrorMessages.java#L28 keyword: 'Invalid search query', - cause: 'there exists invalid custom feature aggregation query', - actionItem: 'Revise your custom feature aggregation query and try again.', + cause: 'the custom query caused an invalid feature aggregation', + actionItem: + 'Revise the custom query in your feature aggregations and try again.', }, UNKNOWN_EXCEPTION: { //https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/development/src/main/java/com/amazon/opendistroforelasticsearch/ad/transport/AnomalyResultTransportAction.java#L438