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 ApiHttpException
create
(ApiHttpRequest request, ApiHttpResponse<byte[]> response) default ApiHttpException
createClientException
(ApiHttpRequest request, ApiHttpResponse<byte[]> response) default ApiHttpException
createServerException
(ApiHttpRequest request, ApiHttpResponse<byte[]> response) static HttpExceptionFactory
of
(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
-