Skip to content

Commit

Permalink
feat: Add warning log to Hashicrop Vault resolveSecret function
Browse files Browse the repository at this point in the history
  • Loading branch information
awellnitz-materna committed Oct 12, 2023
1 parent d05529f commit 5a13838
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*
* Contributors:
* Mercedes-Benz Tech Innovation GmbH - Initial API and Implementation
* Materna Information & Communications SE - Refactoring
*
*/

Expand Down Expand Up @@ -39,6 +40,10 @@ public HashicorpVault(@NotNull HashicorpVaultClient hashicorpVaultClient, @NotNu
public @Nullable String resolveSecret(String key) {
var result = hashicorpVaultClient.getSecretValue(key);

if (result.failed()) {
monitor.warning("Failed to resolve secret: " + result.getFailureMessages());
}

return result.succeeded() ? result.getContent() : null;
}

Expand Down

0 comments on commit 5a13838

Please sign in to comment.