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.endObject();
|
||||||
historyEntry.field("request");
|
historyEntry.field("request");
|
||||||
AlertUtils.writeSearchRequest(searchRequest, historyEntry, params);
|
AlertUtils.writeSearchRequest(searchRequest, historyEntry, params);
|
||||||
historyEntry.field("response", searchResponse);
|
if (searchResponse != null) {
|
||||||
|
historyEntry.field("response", searchResponse);
|
||||||
|
}
|
||||||
|
|
||||||
historyEntry.startObject("actions");
|
historyEntry.startObject("actions");
|
||||||
for (AlertAction action : actions) {
|
for (AlertAction action : actions) {
|
||||||
|
|
|
@ -240,11 +240,7 @@ public class AlertActionManager extends AbstractComponent {
|
||||||
throw new ElasticsearchIllegalArgumentException("Unexpected field [" + currentFieldName + "]");
|
throw new ElasticsearchIllegalArgumentException("Unexpected field [" + currentFieldName + "]");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (token == XContentParser.Token.VALUE_NULL) {
|
throw new ElasticsearchIllegalArgumentException("Unexpected token [" + token + "] for [" + currentFieldName + "]");
|
||||||
logger.warn("Got null value for [{}]", currentFieldName);
|
|
||||||
} else {
|
|
||||||
throw new ElasticsearchIllegalArgumentException("Unexpected token [" + token + "] for [" + currentFieldName + "]");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
Loading…
Reference in New Issue