We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0e5e24 commit f355c41Copy full SHA for f355c41
src/index.ts
@@ -25,7 +25,7 @@ class ServerlessAWSSecret {
25
const { SecretString } = await client.send(command);
26
27
if (!SecretString) {
28
- throw new Error(`Failed to retrieve the secret: ${this.options.secretId}`);
+ throw new this.serverless.classes.Error(`Failed to retrieve the secret: ${this.options.secretId}`);
29
}
30
31
const secrets = JSON.parse(SecretString);
src/index.types.ts
@@ -13,6 +13,9 @@ export interface Serverless {
13
};
14
15
16
+ classes: {
17
+ Error: ErrorConstructor;
18
+ };
19
20
21
export interface ServerlessSecretHooks {
0 commit comments