Class ErrorResponse
QueryException
with the intended going-forward error responses from DruidException
The intent is that eventually QueryException is completely subsumed by
DruidException in which case the legacy bits of this class can hopefully also be removed.
The intended long-term schema of output is an object that looks like
{ "errorCode": `a code string`, "persona": USER | ADMIN | OPERATOR | DEVELOPER "category": DEFENSIVE | INVALID_INPUT | UNAUTHORIZED | CAPACITY_EXCEEDED | CANCELED | RUNTIME_FAILURE | TIMEOUT | UNSUPPORTED | UNCATEGORIZED "errorMessage": `a message for the intended audience` "context": `a map of extra context values that might be helpful` }
In the interim, there are extra fields that also end up included so that the wire-schema can also be interpretted and handled by clients that are built assuming they are looking at QueryExceptions. These extra fields are
{ "error": `an error code from QueryException` | "druidException" "errorClass": `the error class, as used by QueryException` "host": `the host that the exception occurred on, as used by QueryException` }
These 3 top-level fields are deprecated and will eventually disappear from API responses. The values can, instead, be pulled from the context object of an "legacyQueryException" errorCode object. The field names in the context object map as follows * "error" -> "legacyErrorCode" * "errorClass" -> "errorClass" * "host" -> "host"
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ErrorResponse
-
-
Method Details
-
fromMap
-
getAsMap
-
getUnderlyingException
-