Class VaultException

java.lang.Object
java.lang.Throwable
java.lang.Exception
io.github.jopenlibs.vault.VaultException
All Implemented Interfaces:
Serializable

public class VaultException extends Exception
See Also:
  • Constructor Details

    • VaultException

      public VaultException(String message)
    • VaultException

      public VaultException(Throwable t)
    • VaultException

      public VaultException(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(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 Details

    • 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