Skip to content

fix(core/protocols): make error namespace removal unconditional in JSON RPC#8031

Merged
kuhe merged 1 commit into
mainfrom
kuhe/fix/protocols_json1_0
May 18, 2026
Merged

fix(core/protocols): make error namespace removal unconditional in JSON RPC#8031
kuhe merged 1 commit into
mainfrom
kuhe/fix/protocols_json1_0

Conversation

@kuhe

@kuhe kuhe commented May 18, 2026

Copy link
Copy Markdown
Contributor

Issue

V2218690158

Description

This updates the error identification logic in AWS JSON RPC 1.0 to discard the namespace, which is required when services return errors that have different ids than the service model.

See https://smithy.io/2.0/aws/protocols/aws-json-1_0-protocol.html#operation-error-serialization

For example, DynamoDB has one error which appears as:

  • server: com.amazonaws.dynamodb.v20120810#ConditionalCheckFailedException
  • modeled: com.amazonaws.dynamodb#ConditionalCheckFailedException

Without this fix, a bug introduced in https://www.npmjs.com/package/@aws-sdk/core/v/3.974.9 through https://www.npmjs.com/package/@aws-sdk/core/v/3.974.11 causes error instanceof ConditionalCheckFailedException and similar patterned instanceof checks to fail to return true when they are supposed to.

AWS JSON 1.0 is an RPC protocol used by the following services:

  @aws-sdk/client-apprunner
  @aws-sdk/client-arc-region-switch
  @aws-sdk/client-b2bi
  @aws-sdk/client-backup-gateway
  @aws-sdk/client-bcm-dashboards
  @aws-sdk/client-bcm-pricing-calculator
  @aws-sdk/client-bcm-recommended-actions
  @aws-sdk/client-billing
  @aws-sdk/client-cloudcontrol
  @aws-sdk/client-cloudwatch
  @aws-sdk/client-codeconnections
  @aws-sdk/client-codestar-connections
  @aws-sdk/client-compute-optimizer
  @aws-sdk/client-compute-optimizer-automation
  @aws-sdk/client-cost-optimization-hub
  @aws-sdk/client-dynamodb
  @aws-sdk/client-dynamodb-streams
  @aws-sdk/client-evs
  @aws-sdk/client-freetier
  @aws-sdk/client-healthlake
  @aws-sdk/client-interconnect
  @aws-sdk/client-invoicing
  @aws-sdk/client-iotfleetwise
  @aws-sdk/client-kendra-ranking
  @aws-sdk/client-keyspaces
  @aws-sdk/client-keyspacesstreams
  @aws-sdk/client-lookoutequipment
  @aws-sdk/client-mailmanager
  @aws-sdk/client-marketplace-agreement
  @aws-sdk/client-mwaa-serverless
  @aws-sdk/client-network-firewall
  @aws-sdk/client-odb
  @aws-sdk/client-opensearchserverless
  @aws-sdk/client-partnercentral-account
  @aws-sdk/client-partnercentral-benefits
  @aws-sdk/client-partnercentral-channel
  @aws-sdk/client-partnercentral-selling
  @aws-sdk/client-payment-cryptography
  @aws-sdk/client-pcs
  @aws-sdk/client-pinpoint-sms-voice-v2
  @aws-sdk/client-proton
  @aws-sdk/client-route53-recovery-cluster
  @aws-sdk/client-sfn
  @aws-sdk/client-sqs
  @aws-sdk/client-swf
  @aws-sdk/client-timestream-influxdb
  @aws-sdk/client-timestream-query
  @aws-sdk/client-timestream-write
  @aws-sdk/client-verifiedpermissions
  @aws-sdk/client-voice-id
  @aws-sdk/client-workspaces-instances

Testing

added integration test

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 May 18, 2026 14:55
@kuhe kuhe force-pushed the kuhe/fix/protocols_json1_0 branch 2 times, most recently from 4311849 to 32876af Compare May 18, 2026 15:50
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