File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed
x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change 88package org .elasticsearch .xpack .inference ;
99
1010import org .elasticsearch .ElasticsearchException ;
11- import org .elasticsearch .ExceptionsHelper ;
12- import org .elasticsearch .rest .RestStatus ;
11+ import org .elasticsearch .ElasticsearchWrapperException ;
1312
14- public class InferenceException extends ElasticsearchException {
13+ public class InferenceException extends ElasticsearchException implements ElasticsearchWrapperException {
1514 public InferenceException (String message , Throwable cause , Object ... args ) {
1615 super (message , cause , args );
1716 }
1817
19- @ Override
20- public RestStatus status () {
21- // Override status so that we get the status of the cause while retaining the message of the inference exception when emitting to
22- // XContent
23- RestStatus status = RestStatus .INTERNAL_SERVER_ERROR ;
24- Throwable cause = getCause ();
25- if (cause != null ) {
26- status = ExceptionsHelper .status (cause );
27- }
28-
29- return status ;
30- }
3118}
You can’t perform that action at this time.
0 commit comments