Class HttpStatusException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.refcodes.exception.AbstractException
All Implemented Interfaces:
Serializable, org.refcodes.exception.ErrorCodeAccessor, org.refcodes.exception.Trap, org.refcodes.mixin.StatusCodeAccessor<HttpStatusCode>
Direct Known Subclasses:
BadGatewayException, BadRequestException, ConflictException, ExpectationFailedException, FailedDependencyException, ForbiddenException, GatewayTimeoutException, GoneException, HttpResponseException, HttpVersionNotSupportedException, InsufficientSpaceOnResourceException, InsufficientStorageException, InternalClientErrorException, InternalServerErrorException, LengthRequiredException, LockedException, MethodFailureException, MethodNotAllowedException, MovedPermanentlyException, MovedTemporarilyException, MultipleChoicesException, MultiStatusException, NoContentException, NonAuthoritativeInformationException, NotAcceptableException, NotFoundException, NotImplementedException, NotModifiedException, PartialContentException, PaymentRequiredException, PreconditionFailedException, ProxyAuthenticationRequiredException, ReauthenticationRequiredException, RequestedRangeNotSatisfiableException, RequestTimeoutException, RequestTooLongException, RequestUriTooLongException, ResetContentException, SeeOtherException, ServiceUnavailableException, TemporaryRedirectException, UnassignedStatusCodeException, UnauthorizedException, UnavailableForLegalReasonsException, UnprocessableEntityException, UnsupportedMediaTypeException, UseProxyException, VersionNotSupportedException

public class HttpStatusException extends HttpException implements org.refcodes.mixin.StatusCodeAccessor<HttpStatusCode>
Base exception for HTTP status code related exceptions. Thrown in case a HTTP response was of an erroneous status.
See Also:
  • Constructor Details

    • HttpStatusException

      protected HttpStatusException(int aStatusCode, String aMessage)
      Instantiates a new http status exception.
      Parameters:
      aStatusCode - the status code
      aMessage - The aMessage describing this exception.
    • HttpStatusException

      public HttpStatusException(HttpStatusCode aStatusCode, String aMessage, String aErrorCode)
      Instantiates a new http status exception.
      Parameters:
      aStatusCode - the status code
      aMessage - The aMessage describing this exception.
      aErrorCode - The error code identifying this exception.
    • HttpStatusException

      public HttpStatusException(HttpStatusCode aStatusCode, String aMessage, Throwable aCause, String aErrorCode)
      Instantiates a new http status exception.
      Parameters:
      aStatusCode - the status code
      aMessage - The aMessage describing this exception.
      aCause - The Throwable (Exception) causing this exception.
      aErrorCode - The error code identifying this exception.
    • HttpStatusException

      public HttpStatusException(HttpStatusCode aStatusCode, String aMessage, Throwable aCause)
      Instantiates a new http status exception.
      Parameters:
      aStatusCode - the status code
      aMessage - The aMessage describing this exception.
      aCause - The Throwable (Exception) causing this exception.
    • HttpStatusException

      public HttpStatusException(HttpStatusCode aStatusCode, String aMessage)
      Instantiates a new http status exception.
      Parameters:
      aStatusCode - the status code
      aMessage - The aMessage describing this exception.
    • HttpStatusException

      public HttpStatusException(HttpStatusCode aStatusCode, Throwable aCause, String aErrorCode)
      Instantiates a new http status exception.
      Parameters:
      aStatusCode - the status code
      aCause - The Throwable (Exception) causing this exception.
      aErrorCode - The error code identifying this exception.
    • HttpStatusException

      public HttpStatusException(HttpStatusCode aStatusCode, Throwable aCause)
      Instantiates a new http status exception.
      Parameters:
      aStatusCode - the status code
      aCause - The Throwable (Exception) causing this exception.
  • Method Details

    • getStatusCode

      public HttpStatusCode getStatusCode()
      Specified by:
      getStatusCode in interface org.refcodes.mixin.StatusCodeAccessor<HttpStatusCode>