Do not print stacktrace in response models (#13)

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

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}