Skip to content

fix(core/protocols): use composite error registry for error handling, revert default error message to "UnknownError"#7877

Merged
kuhe merged 1 commit intomainfrom
kuhe/fix/error-handling
Mar 23, 2026
Merged

fix(core/protocols): use composite error registry for error handling, revert default error message to "UnknownError"#7877
kuhe merged 1 commit intomainfrom
kuhe/fix/error-handling

Conversation

@kuhe
Copy link
Copy Markdown
Contributor

@kuhe kuhe commented Mar 23, 2026

Issue

Prior PR about this, incomplete fix: smithy-lang/smithy-typescript#1867

reported bug: #7507
reported bug: #7859
reported bug: aws/aws-cdk-cli#954
reported bug: smithy-lang/smithy-typescript#1930

Description

When @smithy/core is duplicated within an application's node_modules, the error creation mechanism in the AWS SDK JS may produce a generic error instead of the expected service synthetic/generic error (e.g. S3ServiceException) or service-modeled error (e.g. BucketAlreadyExists).

There was a previous PR that attempted to fix this, but it was incomplete.

Testing

new unit tests

updated snapshots

Checklist

  • If the PR is a feature, add integration tests (*.integ.spec.ts) or E2E tests.
    • It's not a feature.
  • My E2E tests are resilient to concurrent i/o.
    • I didn't write any E2E tests.
  • I added access level annotations e.g. @public, @internal tags and enabled doc generation on the package. Remember that access level annotations go below the description, not above.
    • I didn't add any public functions.
  • Streams - how do they work?? My WebStream readers/locks are properly lifecycled. Node.js stream backpressure is handled. Error handling.
    • No streams here.

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

@kuhe kuhe requested a review from a team as a code owner March 23, 2026 16:18
@kuhe kuhe force-pushed the kuhe/fix/error-handling branch from 1f23a0d to f994238 Compare March 23, 2026 16:31
@kuhe kuhe changed the title fix(core/protocols): use composite error registry for error handling fix(core/protocols): use composite error registry for error handling, default error message to "UnknownError" Mar 23, 2026
@kuhe kuhe changed the title fix(core/protocols): use composite error registry for error handling, default error message to "UnknownError" fix(core/protocols): use composite error registry for error handling, revert default error message to "UnknownError" Mar 23, 2026
@kuhe kuhe force-pushed the kuhe/fix/error-handling branch from f994238 to df9c1ba Compare March 23, 2026 17:07
@kuhe kuhe merged commit 55f7726 into main Mar 23, 2026
7 checks passed
@kuhe kuhe deleted the kuhe/fix/error-handling branch March 23, 2026 17:54
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants