null check bug fix

This commit is contained in:
phact 2023-08-29 22:04:32 -04:00
parent 0092cb754c
commit e4903c37b9

View File

@ -98,6 +98,9 @@ public class HttpOp implements CycleOp {
ObjectMapper mapper = new ObjectMapper();
JsonNode json = mapper.readTree(response.body());
if (json.get("hits") == null) {
return null;
}
Iterable<JsonNode> hits = json.get("hits").get("hits");
// get length from hits iterator