Class HttpServiceRequestException

  • All Implemented Interfaces:
    java.io.Serializable

    public class HttpServiceRequestException
    extends java.lang.RuntimeException
    Signifies that some HTTP request received by a HttpService contains an error and, therefore, will not be processed.

    As these exceptions are expected to be quite common, and are caused by external rather than internal mistakes, they do not produce stack traces. If an HTTP request causes an error that should generate a stack trace, some other exception type should be used instead.

    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      HttpStatus status()  
      • 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

      • HttpServiceRequestException

        public HttpServiceRequestException​(HttpStatus status)
        Creates new HTTP request exception with given HTTP status.
        Parameters:
        status - HTTP status.
      • HttpServiceRequestException

        public HttpServiceRequestException​(HttpStatus status,
                                           java.lang.String message)
        Creates new HTTP request exception with given HTTP status and message.
        Parameters:
        status - HTTP status.
        message - Human-readable description of issue.
    • Method Detail

      • status

        public HttpStatus status()
        Returns:
        HTTP status code to use in response to requester.