Class CmpProtocolException

java.lang.Object
java.lang.Throwable
java.lang.Exception
zeroecho.pki.server.cmp.CmpProtocolException
All Implemented Interfaces:
Serializable

public final class CmpProtocolException extends Exception
Signals a CMP protocol-level error that maps to an HTTP error response.

The httpStatus() returns the HTTP status code to send to the client. For CMP over HTTP (RFC 6712), protocol errors are typically surfaced as PKIMessage with PKIStatus rejection; transport-layer errors use the HTTP status code returned here.

Since:
1.0
See Also:
  • Constructor Details

    • CmpProtocolException

      public CmpProtocolException(int httpStatus, String message)
      Creates a CMP protocol exception.
      Parameters:
      httpStatus - HTTP status code (4xx or 5xx)
      message - human-readable error description
    • CmpProtocolException

      public CmpProtocolException(int httpStatus, String message, Throwable cause)
      Creates a CMP 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