Class RequestException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.tccc.kos.commons.util.dispatcher.exceptions.RequestException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BadRequestException, InternalErrorException, NotFoundException, UnauthorizedException

public class RequestException extends RuntimeException
Base exception for all exceptions that can be thrown when a client makes a web request.

RequestException and its subclasses are unchecked exceptions. Unchecked exceptions do not need to be declared in a method or constructor's throws clause.

Since:
1.0
Version:
2022-09-01
See Also:
  • Constructor Details

    • RequestException

      public RequestException(int status, String message, Throwable cause)
      Constructs a new "request" exception.
      Parameters:
      status - the HTTP status code associated with this exception
      message - the detailed error message
      cause - the exception that caused this exception
  • Method Details

    • getStatus

      public int getStatus()
      Returns the associated HTTP status code.
      Returns:
      the HTTP status code