Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

return no data error message to preview #29

Merged
merged 1 commit into from
Jan 15, 2020
Merged

return no data error message to preview #29

merged 1 commit into from
Jan 15, 2020

Conversation

wnbts
Copy link
Contributor

@wnbts wnbts commented Jan 14, 2020

Current preview returns an internal exception when there is no data. For an example, see #28 This pr handles the case with a clear error message, as shown below.

[elasticsearch] java.lang.IllegalArgumentException: No data to preview anomaly detection.
[elasticsearch]         at com.amazon.opendistroforelasticsearch.ad.feature.FeatureManager.lambda$getPreviewFeatures$14(FeatureManager.java:277) [opendistro-anomaly-detection-1.2.1.0-alpha.jar:1.2.1.0-alpha]
[elasticsearch]         at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:62) [elasticsearch-7.2.1.jar:7.2.1]
[elasticsearch]         at com.amazon.opendistroforelasticsearch.ad.feature.FeatureManager.lambda$getSamplesForRanges$19(FeatureManager.java:347) [opendistro-anomaly-detection-1.2.1.0-alpha.jar:1.2.1.0-alpha]
[elasticsearch]         at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:62) [elasticsearch-7.2.1.jar:7.2.1]
[elasticsearch]         at com.amazon.opendistroforelasticsearch.ad.feature.SearchFeatureDao.lambda$getFeatureSamplesForPeriods$24(SearchFeatureDao.java:196) [opendistro-anomaly-detection-1.2.1.0-alpha.jar:1.2.1.0-alpha]
[elasticsearch]         at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:62) [elasticsearch-7.2.1.jar:7.2.1]
[elasticsearch]         at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:68) [elasticsearch-7.2.1.jar:7.2.1]
[elasticsearch]         at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:64) [elasticsearch-7.2.1.jar:7.2.1]

@wnbts wnbts marked this pull request as ready for review January 14, 2020 02:27
@wnbts wnbts merged commit 25cd3ae into opendistro-for-elasticsearch:development Jan 15, 2020
@wnbts wnbts deleted the preview branch June 17, 2020 23:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants