Do not print stacktrace in response models (#13)
This commit is contained in:
parent
c8a2e0784f
commit
238ac8bd10
@ -2,6 +2,7 @@
|
||||
* [fix] Prevent potential NPE on SecretResponse getter
|
||||
* [fix] Fields of InvalidResposneException made final
|
||||
* [fix] Fix typo in method name `listAppRoleSecrets()` (#14)
|
||||
* [fix] Removed stack traces on PUT request and response deserialization (#13)
|
||||
* [text] Tested against Vault 0.8.1, increased coverage
|
||||
|
||||
## 0.6.1 [2017-08-02]
|
||||
|
@ -46,8 +46,7 @@ public final class AppRoleResponse extends VaultDataResponse {
|
||||
});
|
||||
this.role = mapper.readValue(mapper.writeValueAsString(filteredData), AppRole.class);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw new InvalidResponseException();
|
||||
throw new InvalidResponseException("Failed deserializing response", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,8 +46,7 @@ public final class AppRoleSecretResponse extends VaultDataResponse {
|
||||
});
|
||||
this.secret = mapper.readValue(mapper.writeValueAsString(filteredData), AppRoleSecret.class);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw new InvalidResponseException();
|
||||
throw new InvalidResponseException("Failed deserializing response", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,8 +49,7 @@ public final class AuthResponse extends VaultDataResponse {
|
||||
try {
|
||||
this.auth = mapper.readValue(mapper.writeValueAsString(auth), AuthData.class);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw new InvalidResponseException();
|
||||
throw new InvalidResponseException("Failed deserializing response", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,8 +50,7 @@ public final class TokenResponse extends VaultDataResponse {
|
||||
try {
|
||||
this.data = mapper.readValue(mapper.writeValueAsString(data), TokenData.class);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw new InvalidResponseException();
|
||||
throw new InvalidResponseException("Failed deserializing response", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user