Adds an error message for accession failure
This commit is contained in:
parent
2de4cdd301
commit
f7e4b34107
@ -12,7 +12,7 @@ public enum SecretManager {
|
||||
|
||||
private final String resourceId;
|
||||
|
||||
private SecretManager(String resourceId) {
|
||||
SecretManager(String resourceId) {
|
||||
this.resourceId = resourceId;
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@ public enum SecretManager {
|
||||
try (SecretManagerServiceClient client = SecretManagerServiceClient.create()) {
|
||||
return client.accessSecretVersion(this.resourceId).getPayload().getData().toStringUtf8();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
e.printStackTrace(); // TODO: Add plain text error message to log to console
|
||||
System.exit(1); // Secrets are integral to full operation, crash if not retrieved properly.
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user