Skip to content

Commit

Permalink
Do not hide deserialization failures
Browse files Browse the repository at this point in the history
  • Loading branch information
craigtaverner committed May 9, 2022
1 parent 50db9a4 commit 3354a59
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import org.elasticsearch.xpack.spatial.search.aggregations.support.GeoShapeValuesSourceType;

import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
Expand Down Expand Up @@ -406,8 +407,7 @@ public GeoPoint getInternalLabelPosition() {
try {
return value.labelPosition();
} catch (IOException e) {
// Most of the time the centroid is a good compromise, but perhaps we should know about this error anyway?
return centroid;
throw new UncheckedIOException("Failed to parse geo shape label position: " + e.getMessage(), e);
}
}

Expand Down

0 comments on commit 3354a59

Please sign in to comment.