Class ErrorCause
java.lang.Object
co.elastic.clients.elasticsearch._types.ErrorCause
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public class ErrorCause extends java.lang.Object implements JsonpSerializable
Cause and details about a request failure. This class defines the properties
common to all error types. Additional details are also provided, that depend
on the error type.
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ErrorCause.Builder
Builder forErrorCause
. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<ErrorCause>
_DESERIALIZER
Json deserializer forErrorCause
-
Method Summary
Modifier and Type Method Description ErrorCause
causedBy()
API name:caused_by
java.util.Map<java.lang.String,JsonData>
metadata()
Additional details about the errorstatic ErrorCause
of(java.util.function.Function<ErrorCause.Builder,ObjectBuilder<ErrorCause>> fn)
java.lang.String
reason()
Required - A human-readable explanation of the error, in englishjava.util.List<ErrorCause>
rootCause()
API name:root_cause
void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
Serialize this object to JSON.protected void
serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupErrorCauseDeserializer(ObjectDeserializer<ErrorCause.Builder> op)
java.lang.String
stackTrace()
The server stack trace.java.util.List<ErrorCause>
suppressed()
API name:suppressed
java.lang.String
toString()
java.lang.String
type()
The type of errorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forErrorCause
-
-
Method Details
-
of
public static ErrorCause of(java.util.function.Function<ErrorCause.Builder,ObjectBuilder<ErrorCause>> fn) -
metadata
Additional details about the error -
type
@Nullable public final java.lang.String type()The type of errorAPI name:
type
-
reason
public final java.lang.String reason()Required - A human-readable explanation of the error, in englishAPI name:
reason
-
stackTrace
@Nullable public final java.lang.String stackTrace()The server stack trace. Present only if theerror_trace=true
parameter was sent with the request.API name:
stack_trace
-
causedBy
API name:caused_by
-
rootCause
API name:root_cause
-
suppressed
API name:suppressed
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
setupErrorCauseDeserializer
-