Module org.elasticsearch.xcore
Class XContentFormattedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.elasticsearch.ElasticsearchException
org.elasticsearch.xpack.core.inference.results.XContentFormattedException
- All Implemented Interfaces:
Serializable,Writeable,ChunkedToXContent,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentFragment
- Direct Known Subclasses:
UnifiedChatCompletionException
Similar to
ElasticsearchWrapperException, this will wrap an Exception to generate an xContent using
ElasticsearchException.generateFailureXContent(XContentBuilder, Params, Exception, boolean).
Extends ElasticsearchException to provide REST handlers the status() method in order to set the response header.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from class org.elasticsearch.ElasticsearchException
REST_EXCEPTION_SKIP_CAUSE, REST_EXCEPTION_SKIP_STACK_TRACE, REST_EXCEPTION_SKIP_STACK_TRACE_DEFAULT, STACK_TRACEFields inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
EMPTYFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionXContentFormattedException(String message, Throwable cause, RestStatus status) XContentFormattedException(String message, RestStatus status) XContentFormattedException(Throwable cause, RestStatus status) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatus()Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunked(org.elasticsearch.core.RestApiVersion restApiVersion, org.elasticsearch.xcontent.ToXContent.Params params) Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunked(org.elasticsearch.xcontent.ToXContent.Params params) Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunkedV8(org.elasticsearch.xcontent.ToXContent.Params params) Methods inherited from class org.elasticsearch.ElasticsearchException
addBodyHeader, addBodyHeader, addHttpHeader, addHttpHeader, addMetadata, addMetadata, failureFromXContent, fromXContent, generateFailureXContent, generateThrowableXContent, generateThrowableXContent, getBodyHeader, getBodyHeaderKeys, getBodyHeaders, getDetailedMessage, getExceptionName, getExceptionName, getHttpHeader, getHttpHeaderKeys, getHttpHeaders, getId, getIndex, getMetadata, getMetadata, getMetadataKeys, getResourceId, getResourceType, getRootCause, getShardId, guessRootCauses, guessRootCauses, innerFromXContent, innerToXContent, isRegistered, isTimeout, metadataToXContent, readException, readException, readStackTrace, setIndex, setIndex, setResources, setShard, toString, toXContent, toXContent, unwrapCause, writeException, writeStackTraces, writeTo, writeToMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
X_CONTENT_PARAM
- See Also:
-
-
Constructor Details
-
XContentFormattedException
-
XContentFormattedException
-
XContentFormattedException
-
-
Method Details
-
status
- Overrides:
statusin classElasticsearchException
-
toXContentChunked
public Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunked(org.elasticsearch.xcontent.ToXContent.Params params) - Specified by:
toXContentChunkedin interfaceChunkedToXContent
-
toXContentChunked
public Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunked(org.elasticsearch.core.RestApiVersion restApiVersion, org.elasticsearch.xcontent.ToXContent.Params params) - Specified by:
toXContentChunkedin interfaceChunkedToXContent
-
toXContentChunkedV8
public Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunkedV8(org.elasticsearch.xcontent.ToXContent.Params params) - Specified by:
toXContentChunkedV8in interfaceChunkedToXContent
-
isFragment
public boolean isFragment()- Specified by:
isFragmentin interfaceChunkedToXContent- Specified by:
isFragmentin interfaceorg.elasticsearch.xcontent.ToXContent- Specified by:
isFragmentin interfaceorg.elasticsearch.xcontent.ToXContentFragment
-