BetterCloud / vault-java-driver

Zero-dependency Java client for HashiCorp's Vault
https://bettercloud.github.io/vault-java-driver/
336 stars 223 forks source link

Possible Bug Uncaught Exception #147

Open sdeghou opened 5 years ago

sdeghou commented 5 years ago

Those two catch blocks https://github.com/BetterCloud/vault-java-driver/blob/master/src/main/java/com/bettercloud/vault/response/LogicalResponse.java#L56

`

private void parseMetadataFields() {
    try {
        final String jsonString = new String(getRestResponse().getBody(), "UTF-8");
        final JsonObject jsonObject = Json.parse(jsonString).asObject();

        this.leaseId = jsonObject.get("lease_id").asString();
        this.renewable = jsonObject.get("renewable").asBoolean();
        this.leaseDuration = jsonObject.get("lease_duration").asLong();
    } catch (Exception e) {
    }
}`

https://github.com/BetterCloud/vault-java-driver/blob/master/src/main/java/com/bettercloud/vault/response/LogicalResponse.java#L75

catch exceptions Exception but are empty.

Is this something you might want to correct ?