Class ErrorMessage
java.lang.Object
io.confluent.kafka.schemaregistry.client.rest.entities.ErrorMessage
Generic JSON error message.
This is an updated version of the original
io.confluent.kafka.schemaregistry.client.rest.entities.ErrorMessage
class from the Confluent Schema Registry Client, which has the same
structure in Java and is still fully compatible with the client code,
but supports parsing the source JSON error message in more formats
via Jackson annotations (see unpackNestedError(java.util.Map<java.lang.String, java.lang.Object>)).
In additional to the original error format:
{
"error_code": 400,
"message": "..."
}
It also supports this format:
{
"error: {
"code": 400,
"message": "..."
}
}
Since the class is in the same package
io.confluent.kafka.schemaregistry.client.rest.entities,
pre-pending this library to the classpath will override its implementation
from the Schema Registry Client library and allow parsing Managed Kafka
style error messages.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintinthashCode()voidsetErrorCode(int errorCode) voidsetMessage(String message) voidunpackNestedError(Map<String, Object> error)
-
Constructor Details
-
ErrorMessage
public ErrorMessage() -
ErrorMessage
-
-
Method Details
-
getErrorCode
public int getErrorCode() -
setErrorCode
public void setErrorCode(int errorCode) -
getMessage
-
setMessage
-
unpackNestedError
-
equals
-
hashCode
-