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:
- OciRestException,- RestException,- VaultRestException
 
 public abstract class ApiRestException extends ApiException 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:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classApiRestException.BaseBuilder<B extends ApiRestException.BaseBuilder<B>>Base builder extended by specific builder class.
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedApiRestException(ApiRestException.BaseBuilder<?> builder)Create a new instance using base builder.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>apiSpecificError()API specific error message if such is available.Headersheaders()Response HTTP headers.StringrequestId()Request ID used to invoke the request.Http.ResponseStatusstatus()Returned HTTP status.- 
Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
- 
 
- 
- 
- 
Constructor Detail- 
ApiRestExceptionprotected ApiRestException(ApiRestException.BaseBuilder<?> builder) Create a new instance using base builder.- Parameters:
- builder- builder
 
 
- 
 - 
Method Detail- 
statuspublic Http.ResponseStatus status() Returned HTTP status.- Returns:
- status
 
 - 
requestIdpublic String requestId() Request ID used to invoke the request. This may have been generated byRestApi.- Returns:
- request ID
 
 - 
apiSpecificErrorpublic Optional<String> apiSpecificError() API specific error message if such is available.- Returns:
- api specific error, probably obtained from a header or entity
 
 - 
headerspublic Headers headers() Response HTTP headers.- Returns:
- headers
 
 
- 
 
-