Class ApiRestException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.helidon.integrations.common.rest.ApiException
io.helidon.integrations.common.rest.ApiRestException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RestException
,VaultRestException
Exception when invoking remote REST API caused by wrong response from the API call.
This exception means the API was invoked, we got a response back, but the status of the
response was not valid for the invoked request.
Each implementation is expected to extend this class and its builder to provide
better details for the integrated system (such as system specific error messages).
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Base builder extended by specific builder class. -
Constructor Summary
ModifierConstructorDescriptionprotected
ApiRestException
(ApiRestException.BaseBuilder<?> builder) Create a new instance using base builder. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ApiRestException
Create a new instance using base builder.- Parameters:
builder
- builder
-
-
Method Details
-
status
Returned HTTP status.- Returns:
- status
-
requestId
Request ID used to invoke the request. This may have been generated byRestApi
.- Returns:
- request ID
-
apiSpecificError
API specific error message if such is available.- Returns:
- api specific error, probably obtained from a header or entity
-
headers
Response HTTP headers.- Returns:
- headers
-