Do not print stacktrace in response models (#13)

This commit is contained in:
Stefan Kalscheuer 2017-08-18 21:09:40 +02:00
parent c8a2e0784f
commit 238ac8bd10
5 changed files with 5 additions and 8 deletions

View File

@ -2,6 +2,7 @@
* [fix] Prevent potential NPE on SecretResponse getter * [fix] Prevent potential NPE on SecretResponse getter
* [fix] Fields of InvalidResposneException made final * [fix] Fields of InvalidResposneException made final
* [fix] Fix typo in method name `listAppRoleSecrets()` (#14) * [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 * [text] Tested against Vault 0.8.1, increased coverage
## 0.6.1 [2017-08-02] ## 0.6.1 [2017-08-02]

View File

@ -46,8 +46,7 @@ public final class AppRoleResponse extends VaultDataResponse {
}); });
this.role = mapper.readValue(mapper.writeValueAsString(filteredData), AppRole.class); this.role = mapper.readValue(mapper.writeValueAsString(filteredData), AppRole.class);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); throw new InvalidResponseException("Failed deserializing response", e);
throw new InvalidResponseException();
} }
} }

View File

@ -46,8 +46,7 @@ public final class AppRoleSecretResponse extends VaultDataResponse {
}); });
this.secret = mapper.readValue(mapper.writeValueAsString(filteredData), AppRoleSecret.class); this.secret = mapper.readValue(mapper.writeValueAsString(filteredData), AppRoleSecret.class);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); throw new InvalidResponseException("Failed deserializing response", e);
throw new InvalidResponseException();
} }
} }

View File

@ -49,8 +49,7 @@ public final class AuthResponse extends VaultDataResponse {
try { try {
this.auth = mapper.readValue(mapper.writeValueAsString(auth), AuthData.class); this.auth = mapper.readValue(mapper.writeValueAsString(auth), AuthData.class);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); throw new InvalidResponseException("Failed deserializing response", e);
throw new InvalidResponseException();
} }
} }

View File

@ -50,8 +50,7 @@ public final class TokenResponse extends VaultDataResponse {
try { try {
this.data = mapper.readValue(mapper.writeValueAsString(data), TokenData.class); this.data = mapper.readValue(mapper.writeValueAsString(data), TokenData.class);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); throw new InvalidResponseException("Failed deserializing response", e);
throw new InvalidResponseException();
} }
} }