Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update exception in getStack for SDK v3 #129

Merged
merged 1 commit into from
Feb 3, 2024
Merged

Update exception in getStack for SDK v3 #129

merged 1 commit into from
Feb 3, 2024

Conversation

SanariSan
Copy link
Contributor

@SanariSan SanariSan commented Feb 3, 2024

Issue #127

Description of changes:
Adjusted for SDK v3 compatibility
See API documentation, Throws section

For testing I've hardcoded my stack details and added console.log(e)
Error in catch block looks like this:

CloudFormationServiceException [ValidationError]: Stack with id test-prod-vpc does not exist
    at throwDefaultError (/home/user/Code/libs/aws-cloudformation-github-deploy/node_modules/@smithy/smithy-client/dist-cjs/default-error-handler.js:8:22)
    at /home/user/Code/libs/aws-cloudformation-github-deploy/node_modules/@smithy/smithy-client/dist-cjs/default-error-handler.js:18:39
    at de_DescribeStacksCommandError (/home/user/Code/libs/aws-cloudformation-github-deploy/node_modules/@aws-sdk/client-cloudformation/dist-cjs/protocols/Aws_query.js:1727:12)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /home/user/Code/libs/aws-cloudformation-github-deploy/node_modules/@smithy/middleware-serde/dist-cjs/deserializerMiddleware.js:7:24
    at async /home/user/Code/libs/aws-cloudformation-github-deploy/node_modules/@aws-sdk/middleware-signing/dist-cjs/awsAuthMiddleware.js:30:20
    at async /home/user/Code/libs/aws-cloudformation-github-deploy/node_modules/@smithy/middleware-retry/dist-cjs/retryMiddleware.js:31:46
    at async /home/user/Code/libs/aws-cloudformation-github-deploy/node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js:7:26 {
  '$fault': 'client',
  '$metadata': {
    httpStatusCode: 400,
    requestId: '4995d2b8-****-****-****-30e1de77fc62',
    extendedRequestId: undefined,
    cfId: undefined,
    attempts: 1,
    totalRetryDelay: 0
  },
  Type: 'Sender',
  Code: 'ValidationError'
}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kddejong kddejong merged commit f70ab9c into aws-actions:master Feb 3, 2024
1 check passed
@kddejong
Copy link
Contributor

kddejong commented Feb 3, 2024

While the exception does exist in v3 it isn't returned by the describe stacks command. Looks like that this error is only returned by a small set of commands... Thanks for submitting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants