Class FeignClientException

  • All Implemented Interfaces:
    Serializable, org.bremersee.exception.ErrorCodeAware, org.bremersee.exception.HttpResponseHeadersAware, org.bremersee.exception.HttpStatusAware, org.bremersee.exception.RestApiExceptionAware

    public class FeignClientException
    extends feign.FeignException
    implements org.bremersee.exception.HttpStatusAware, org.bremersee.exception.HttpResponseHeadersAware, org.bremersee.exception.RestApiExceptionAware, org.bremersee.exception.ErrorCodeAware
    Feign exception that stores the error payload as a RestApiException. If the error payload cannot be parsed as RestApiException, the whole body of the error payload will be stored in the message field of the RestApiException.
    Author:
    Christian Bremer
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class feign.FeignException

        feign.FeignException.BadGateway, feign.FeignException.BadRequest, feign.FeignException.Conflict, feign.FeignException.FeignClientException, feign.FeignException.FeignServerException, feign.FeignException.Forbidden, feign.FeignException.GatewayTimeout, feign.FeignException.Gone, feign.FeignException.InternalServerError, feign.FeignException.MethodNotAllowed, feign.FeignException.NotAcceptable, feign.FeignException.NotFound, feign.FeignException.NotImplemented, feign.FeignException.ServiceUnavailable, feign.FeignException.TooManyRequests, feign.FeignException.Unauthorized, feign.FeignException.UnprocessableEntity, feign.FeignException.UnsupportedMediaType
    • Field Summary

      • Fields inherited from interface org.bremersee.exception.ErrorCodeAware

        NO_ERROR_CODE_VALUE
    • Constructor Summary

      Constructors 
      Constructor Description
      FeignClientException​(feign.Request request, Map<String,​? extends Collection<String>> headers, int status, String message, org.bremersee.exception.model.RestApiException restApiException)
      Default constructor.
    • Constructor Detail

      • FeignClientException

        public FeignClientException​(@Nullable
                                    feign.Request request,
                                    @Nullable
                                    Map<String,​? extends Collection<String>> headers,
                                    int status,
                                    @Nullable
                                    String message,
                                    @Nullable
                                    org.bremersee.exception.model.RestApiException restApiException)
        Default constructor.
        Parameters:
        request - the original request
        headers - the response headers
        status - the response status code
        message - the message of this FeignException.FeignClientException
        restApiException - the rest api exception
    • Method Detail

      • getMultiValueHeaders

        public Map<String,​? extends Collection<String>> getMultiValueHeaders()
        Specified by:
        getMultiValueHeaders in interface org.bremersee.exception.HttpResponseHeadersAware
      • getErrorCode

        public String getErrorCode()
        Specified by:
        getErrorCode in interface org.bremersee.exception.ErrorCodeAware