java.lang.Object
java.lang.Throwable
java.lang.Exception
io.github.jopenlibs.vault.VaultException
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVaultException(String message) VaultException(String message, int httpStatusCode) Use this constructor to generate aVaultExceptioninstance that is based on receiving a particular HTTP status code from a Vault server (e.g. 500).VaultException(Throwable t, int httpStatusCode) Use this constructor to generate aVaultExceptioninstance that is based on receiving a particular HTTP status code from a Vault server (e.g. 500). -
Method Summary
Modifier and TypeMethodDescriptionintAn HTTP status code, returned from a Vault server, that is the cause of thisVaultException.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
VaultException
-
VaultException
-
VaultException
Use this constructor to generate aVaultExceptioninstance that is based on receiving a particular HTTP status code from a Vault server (e.g. 500).- Parameters:
message- A string expressing the exception causehttpStatusCode- An HTTP status code returned by a Vault server (e.g. 500)
-
VaultException
Use this constructor to generate aVaultExceptioninstance that is based on receiving a particular HTTP status code from a Vault server (e.g. 500).- Parameters:
t- Another exception that thisVaultExceptionwill wraphttpStatusCode- 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 thisVaultException. Some exceptions are not caused on the Vault side. Obviously, if there is no relevant HTTP status code then this method will return0.- Returns:
- An HTTP status code, returned from a Vault server, that is the cause of this
VaultException
-