Class EstProtocolException

java.lang.Object
java.lang.Throwable
java.lang.Exception
zeroecho.pki.server.est.EstProtocolException
All Implemented Interfaces:
Serializable

public final class EstProtocolException extends Exception
Signals an EST protocol-level error that maps to an HTTP error response.

The httpStatus() returns the HTTP status code to send to the client. The exception message is suitable for inclusion in a text/plain or application/problem+json response body.

Since:
1.0
See Also:
  • Constructor Details

    • EstProtocolException

      public EstProtocolException(int httpStatus, String message)
      Creates an EST protocol exception with the given HTTP status and message.
      Parameters:
      httpStatus - HTTP status code (4xx or 5xx)
      message - human-readable error description (safe to return to the client)
    • EstProtocolException

      public EstProtocolException(int httpStatus, String message, Throwable cause)
      Creates an EST protocol exception with a cause.
      Parameters:
      httpStatus - HTTP status code
      message - human-readable error description
      cause - underlying cause
  • Method Details

    • httpStatus

      public int httpStatus()
      Returns the HTTP status code.
      Returns:
      HTTP status code in the 400–599 range