Skip to content

Commit

Permalink
handled the no record solr error in OlsSolrClient fir #9
Browse files Browse the repository at this point in the history
  • Loading branch information
giraygi committed Apr 19, 2024
1 parent 5590f5f commit 5ef74ec
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ public JsonElement getFirst(OlsSolrQuery query) {

if(qr.getResults().getNumFound() < 1) {
logger.debug("Expected at least 1 result for solr getFirst for solr query = {}", query.constructQuery().jsonStr());
//return new JsonObject();
throw new RuntimeException("Expected at least 1 result for solr getFirst");
return new JsonObject();
//throw new RuntimeException("Expected at least 1 result for solr getFirst");
}

return getOlsEntityFromSolrResult(qr.getResults().get(0));
Expand Down

0 comments on commit 5ef74ec

Please sign in to comment.