Class StreamHttpErrorException

  • All Implemented Interfaces:
    java.io.Serializable

    public class StreamHttpErrorException
    extends StreamException
    An exception indicating that the remote server returned an HTTP error.

    HttpConnectStrategy defines an error as any non-2xx status.

    See StreamException for more about EventSource's exception behavior.

    Since:
    4.0.0
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCode()
      Returns the HTTP status code.
      • 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, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • StreamHttpErrorException

        public StreamHttpErrorException​(int code)
        Constructs an instance.
        Parameters:
        code - the HTTP status
    • Method Detail

      • getCode

        public int getCode()
        Returns the HTTP status code.
        Returns:
        the HTTP status