Skip to content

Conversation

@vigy02
Copy link
Contributor

@vigy02 vigy02 commented Nov 1, 2024

Problem

The CdkErrorMapper was not properly handling the "Error: The security token included in the request is expired" error message, leading to potentially confusing error output for users with expired AWS credentials.

Changes

  • Updated the CdkErrorMapper to catch both "ExpiredToken" and "Error: The security token included in the request is expired" errors
  • Modified the error message to be more descriptive and user-friendly
  • Added a new test case to cover the expanded error handling
  • Updated the existing test to align with the current implementation

Corresponding docs PR, if applicable: N/A

Validation

  • Updated and added unit tests in cdk_error_mapper.test.ts to cover the new error handling

Checklist

  • If this PR includes a functional change to the runtime behavior of the code, I have added or updated automated test coverage for this change.
  • If this PR requires a change to the Project Architecture README, I have included that update in this PR.
  • If this PR requires a docs update, I have linked to that docs PR above.
  • If this PR modifies E2E tests, makes changes to resource provisioning, or makes SDK calls, I have run the PR checks with the run-e2e label set.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@changeset-bot
Copy link

changeset-bot bot commented Nov 1, 2024

🦋 Changeset detected

Latest commit: d4e10f5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@aws-amplify/backend-deployer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vigy02 vigy02 marked this pull request as ready for review November 1, 2024 22:13
@vigy02 vigy02 requested a review from a team as a code owner November 1, 2024 22:13
@vigy02 vigy02 merged commit 7bf0c64 into aws-amplify:main Nov 1, 2024
40 checks passed
@vigy02 vigy02 deleted the reclassify-error branch November 1, 2024 22:15
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.

3 participants