public static class NamedXContentRegistry.UnknownNamedObjectException extends ParsingException
NamedXContentRegistry.parseNamedObject(Class, String, XContentParser, Object) is called with an unregistered
name. When this bubbles up to the rest layer it is converted into a response with 400 BAD REQUEST status.ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>UNKNOWN_POSITIONREST_EXCEPTION_SKIP_STACK_TRACE, REST_EXCEPTION_SKIP_STACK_TRACE_DEFAULTEMPTY_PARAMS| Constructor and Description |
|---|
UnknownNamedObjectException(StreamInput in)
Read from a stream.
|
UnknownNamedObjectException(XContentLocation contentLocation,
java.lang.Class<?> categoryClass,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCategoryClass()
Category class that was missing a parser.
|
java.lang.String |
getName()
Name of the missing parser.
|
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
getColumnNumber, getLineNumber, metadataToXContent, statusaddHeader, addHeader, addMetadata, addMetadata, failureFromXContent, fromXContent, generateFailureXContent, generateThrowableXContent, getDetailedMessage, getExceptionName, getExceptionName, getHeader, getHeaderKeys, getHeaders, getId, getIndex, getMetadata, getMetadata, getMetadataKeys, getResourceId, getResourceType, getRootCause, getShardId, guessRootCauses, guessRootCauses, innerToXContent, isRegistered, readException, readStackTrace, setIndex, setIndex, setResources, setShard, toString, toXContent, unwrapCause, writeStackTracesaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTraceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisFragmentpublic UnknownNamedObjectException(XContentLocation contentLocation, java.lang.Class<?> categoryClass, java.lang.String name)
public UnknownNamedObjectException(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
WriteablewriteTo in interface WriteablewriteTo in class ParsingExceptionjava.io.IOExceptionpublic java.lang.String getCategoryClass()
public java.lang.String getName()