public abstract class VaultResponses extends Object
VaultException.| Constructor and Description |
|---|
VaultResponses() |
| Modifier and Type | Method and Description |
|---|---|
static VaultException |
buildException(HttpStatusCodeException e)
Build a
VaultException given HttpStatusCodeException. |
static VaultException |
buildException(HttpStatusCodeException e,
String path)
|
static VaultException |
buildException(HttpStatus statusCode,
String path,
String message) |
static String |
getError(String json)
Obtain the error message from a JSON response.
|
static <T> ParameterizedTypeReference<VaultResponseSupport<T>> |
getTypeReference(Class<T> responseType)
Create a
ParameterizedTypeReference for responseType. |
static <T> T |
unwrap(String wrappedResponse,
Class<T> responseType)
Unwrap a wrapped response created by Vault Response Wrapping
|
public static VaultException buildException(HttpStatusCodeException e)
VaultException given HttpStatusCodeException.e - must not be null.VaultException.public static VaultException buildException(HttpStatusCodeException e, String path)
e - must not be null.path - must not be null.VaultException.public static VaultException buildException(HttpStatus statusCode, String path, String message)
public static <T> ParameterizedTypeReference<VaultResponseSupport<T>> getTypeReference(Class<T> responseType)
ParameterizedTypeReference for responseType.responseType - must not be null.ParameterizedTypeReference for responseType.public static String getError(String json)
json - must not be null.Copyright © 2016–2020 Pivotal Software, Inc.. All rights reserved.