Package io.vrap.rmf.base.client.error
Interface HttpExceptionFactory
- All Known Implementing Classes:
ApiHttpExceptionFactory,DefaultHttpExceptionFactory
public interface HttpExceptionFactory
The HttpExceptionFactory creates exceptions based on the HTTP status code returned by the
ApiHttpResponse.
It differentiates between client side exceptions (status code 400 to 499) and server side exceptions (status code 500+).-
Method Summary
Modifier and TypeMethodDescriptiondefault ApiHttpExceptioncreate(ApiHttpRequest request, ApiHttpResponse<byte[]> response) default ApiHttpExceptioncreateClientException(ApiHttpRequest request, ApiHttpResponse<byte[]> response) default ApiHttpExceptioncreateServerException(ApiHttpRequest request, ApiHttpResponse<byte[]> response) static HttpExceptionFactoryof(ResponseSerializer serializer)
-
Method Details
-
getResponseSerializer
ResponseSerializer getResponseSerializer() -
create
-
createServerException
default ApiHttpException createServerException(ApiHttpRequest request, ApiHttpResponse<byte[]> response) -
createClientException
default ApiHttpException createClientException(ApiHttpRequest request, ApiHttpResponse<byte[]> response) -
of
-