Class RatpackRetrofitCallException

  • All Implemented Interfaces:
    Serializable

    public class RatpackRetrofitCallException
    extends Exception
    Exception throw from Retrofit clients when using simple types instead of Response and the request is not successful.
    See Also:
    Serialized Form
    • Constructor Detail

      • RatpackRetrofitCallException

        public RatpackRetrofitCallException​(okhttp3.Request request,
                                            Response<?> response)
        Create a wrapped Retrofit exception.
        Parameters:
        request - the Retrofit Request that initiated HTTP request.
        response - the underlying Retrofit Response from the HTTP request.
        Since:
        1.6.0
    • Method Detail

      • getResponse

        public ReceivedResponse getResponse()
        Get the underlying response that resulted in the exception for this HTTP request. This is useful for mapping the exception based on the response information.
        Returns:
        The response for the HTTP call.
        Since:
        1.6.0