File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed
server/src/main/java/org/elasticsearch/cluster/action/index Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -84,21 +84,8 @@ public void onResponse(AcknowledgedResponse acknowledgedResponse) {
84
84
85
85
@ Override
86
86
public void onFailure (Exception e ) {
87
- listener .onFailure (unwrapException ( e ) );
87
+ listener .onFailure (e );
88
88
}
89
89
});
90
90
}
91
-
92
- // todo: this explicit unwrap should not be necessary, but is until guessRootCause is fixed to allow wrapped non-es exception.
93
- private static Exception unwrapException (Exception cause ) {
94
- return cause instanceof ElasticsearchException ? unwrapEsException ((ElasticsearchException ) cause ) : cause ;
95
- }
96
-
97
- private static RuntimeException unwrapEsException (ElasticsearchException esEx ) {
98
- Throwable root = esEx .unwrapCause ();
99
- if (root instanceof RuntimeException ) {
100
- return (RuntimeException ) root ;
101
- }
102
- return new UncategorizedExecutionException ("Failed execution" , root );
103
- }
104
91
}
You can’t perform that action at this time.
0 commit comments