public class VaultException
extends java.lang.Exception
Constructor and 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. |
Modifier and Type | Method and Description |
---|---|
int |
getHttpStatusCode()
An HTTP status code, returned from a Vault server, that is the cause of this
VaultException . |
public VaultException(java.lang.String message)
public VaultException(java.lang.Throwable t)
public VaultException(java.lang.String message, int httpStatusCode)
VaultException
instance that is based on receiving a
particular HTTP status code from a Vault server (e.g. 500).message
- A string expressing the exception causehttpStatusCode
- An HTTP status code returned by a Vault server (e.g. 500)public VaultException(java.lang.Throwable t, int httpStatusCode)
VaultException
instance that is based on receiving a
particular HTTP status code from a Vault server (e.g. 500).t
- Another exception that this VaultException
will wraphttpStatusCode
- An HTTP status code returned by a Vault server (e.g. 500)public int getHttpStatusCode()
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
.VaultException