Class RedirectException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.glassfish.jersey.jdk.connector.internal.RedirectException
All Implemented Interfaces:
Serializable

public class RedirectException extends Exception
This Exception is used only if ClientProperties.FOLLOW_REDIRECTS is set to true.

This exception is thrown when any of the Redirect HTTP response status codes (301, 302, 303, 307, 308) is received and:

  • the chained redirection count exceeds the value of JdkConnectorProperties.MAX_REDIRECTS
  • or an infinite redirection loop is detected
  • or Location response header is missing, empty or does not contain a valid URI.
Author:
Ondrej Kosatka
See Also:
  • Constructor Details

    • RedirectException

      public RedirectException(String message)
      Constructor.
      Parameters:
      message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.
    • RedirectException

      public RedirectException(String message, Throwable t)
      Constructor.
      Parameters:
      message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.