Class VaultException

  • All Implemented Interfaces:
    java.io.Serializable

    public class VaultException
    extends java.lang.Exception
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      VaultException​(java.lang.String message)  
      VaultException​(java.lang.String message, int httpStatusCode)
      Use this constructor to generate a VaultException instance that is based on receiving a particular HTTP status code from a Vault server (e.g.
      VaultException​(java.lang.Throwable t)  
      VaultException​(java.lang.Throwable t, int httpStatusCode)
      Use this constructor to generate a VaultException instance that is based on receiving a particular HTTP status code from a Vault server (e.g.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getHttpStatusCode()
      An HTTP status code, returned from a Vault server, that is the cause of this VaultException.
      • 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

      • VaultException

        public VaultException​(java.lang.String message)
      • VaultException

        public VaultException​(java.lang.Throwable t)
      • VaultException

        public VaultException​(java.lang.String message,
                              int httpStatusCode)
        Use this constructor to generate a VaultException instance that is based on receiving a particular HTTP status code from a Vault server (e.g. 500).
        Parameters:
        message - A string expressing the exception cause
        httpStatusCode - An HTTP status code returned by a Vault server (e.g. 500)
      • VaultException

        public VaultException​(java.lang.Throwable t,
                              int httpStatusCode)
        Use this constructor to generate a VaultException instance that is based on receiving a particular HTTP status code from a Vault server (e.g. 500).
        Parameters:
        t - Another exception that this VaultException will wrap
        httpStatusCode - An HTTP status code returned by a Vault server (e.g. 500)
    • Method Detail

      • getHttpStatusCode

        public int getHttpStatusCode()
        An HTTP status code, returned from a Vault server, that is the cause of this VaultException. Some exceptions are not caused on the Vault side. Obviously, if there is no relevant HTTP status code then this method will return 0.
        Returns:
        An HTTP status code, returned from a Vault server, that is the cause of this VaultException