File tree Expand file tree Collapse file tree
opensearch/src/main/java/org/opensearch/sql/opensearch/storage/scan Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414import java .util .concurrent .Executor ;
1515import javax .annotation .Nullable ;
1616import org .opensearch .OpenSearchException ;
17+ import org .opensearch .OpenSearchSecurityException ;
1718import org .opensearch .sql .data .model .ExprValue ;
1819import org .opensearch .sql .exception .NonFallbackCalciteException ;
1920import org .opensearch .sql .opensearch .client .OpenSearchClient ;
@@ -110,7 +111,12 @@ private OpenSearchResponse getCurrentResponse(OpenSearchRequest request) {
110111 if (isAsync ()) {
111112 try {
112113 return nextBatchFuture .get ();
114+ } catch (OpenSearchSecurityException e ) {
115+ throw e ;
113116 } catch (InterruptedException | ExecutionException e ) {
117+ if (e .getCause () instanceof OpenSearchSecurityException ) {
118+ throw (OpenSearchSecurityException ) e .getCause ();
119+ }
114120 if (e .getCause () instanceof OpenSearchException ) {
115121 if (((OpenSearchException ) e .getCause ()).getRootCause ()
116122 instanceof ArrayIndexOutOfBoundsException ) {
You can’t perform that action at this time.
0 commit comments