Class RatpackRetrofitCallException

  • All Implemented Interfaces:
    java.io.Serializable

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static RatpackRetrofitCallException cause​(Call<?> call, Response<?> response)  
      ratpack.core.http.client.ReceivedResponse getResponse()
      Get the underlying response that resulted in the exception for this HTTP request.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 ratpack.core.http.client.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