Removed error log for null values
Original commit: elastic/x-pack-elasticsearch@4477fc1c2a
This commit is contained in:
parent
775f1cb878
commit
29dd1bb888
|
@ -195,7 +195,9 @@ public class AlertActionEntry implements ToXContent {
|
|||
historyEntry.endObject();
|
||||
historyEntry.field("request");
|
||||
AlertUtils.writeSearchRequest(searchRequest, historyEntry, params);
|
||||
historyEntry.field("response", searchResponse);
|
||||
if (searchResponse != null) {
|
||||
historyEntry.field("response", searchResponse);
|
||||
}
|
||||
|
||||
historyEntry.startObject("actions");
|
||||
for (AlertAction action : actions) {
|
||||
|
|
|
@ -240,11 +240,7 @@ public class AlertActionManager extends AbstractComponent {
|
|||
throw new ElasticsearchIllegalArgumentException("Unexpected field [" + currentFieldName + "]");
|
||||
}
|
||||
} else {
|
||||
if (token == XContentParser.Token.VALUE_NULL) {
|
||||
logger.warn("Got null value for [{}]", currentFieldName);
|
||||
} else {
|
||||
throw new ElasticsearchIllegalArgumentException("Unexpected token [" + token + "] for [" + currentFieldName + "]");
|
||||
}
|
||||
throw new ElasticsearchIllegalArgumentException("Unexpected token [" + token + "] for [" + currentFieldName + "]");
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in New Issue