Skip to content

Commit

Permalink
fix: secrets manager logging (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
joyc-bq authored Jan 2, 2025
1 parent dda3977 commit 4039c5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/lib/authentication/aws_secrets_manager_plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class AwsSecretsManagerPlugin extends AbstractConnectionPlugin {
const config: SecretsManagerClientConfig = {};

if (!secretId) {
throw new AwsWrapperError(Messages.get("AwsSecretsManagerConnectionPlugin.missingRequiredConfigParameter"), WrapperProperties.SECRET_ID.name);
throw new AwsWrapperError(Messages.get("AwsSecretsManagerConnectionPlugin.missingRequiredConfigParameter", WrapperProperties.SECRET_ID.name));
}

if (!region) {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/aws_secrets_manager_plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe("testSecretsManager", () => {
it("missing required parameters", () => {
expect(async () => {
await new AwsSecretsManagerPlugin(mockPluginService, new Map()).connect(TEST_HOSTINFO, TEST_PROPS, true, mockConnectFunction);
}).rejects.toStrictEqual(new AwsWrapperError(Messages.get("AwsSecretsManagerConnectionPlugin.missingRequiredConfigParameter")));
}).rejects.toStrictEqual(new AwsWrapperError(Messages.get("AwsSecretsManagerConnectionPlugin.missingRequiredConfigParameter", "secretId")));
});

// The plugin will attempt to open a connection with a cached secret, but it will fail with a unhandled error.
Expand Down

0 comments on commit 4039c5a

Please sign in to comment.