-
Notifications
You must be signed in to change notification settings - Fork 634
Closed
Labels
bugThis issue is a bug.This issue is a bug.p1This is a high priority issueThis is a high priority issuepending-releaseThis issue will be fixed by an approved PR that hasn't been released yet.This issue will be fixed by an approved PR that hasn't been released yet.potential-regressionMarking this issue as a potential regression to be checked by team memberMarking this issue as a potential regression to be checked by team member
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
We (AWS Amplify) got broken by smithy-lang/smithy-typescript#1484 .
This was dectected by our canary workflow here
https://github.com/aws-amplify/amplify-backend/actions/runs/12586737788/job/35081205621 .
Minimal repro:
import { NoSuchKey, S3, S3ServiceException } from '@aws-sdk/client-s3';
const dummyS3ServiceException = new S3ServiceException({
name: 'TEST_ERROR',
message: 'TEST_MESSAGE',
$fault: 'server',
$metadata: {},
});
console.log(dummyS3ServiceException instanceof NoSuchKey)
Prints
bcd0740fa72c:testapp073 sobkamil$ node index.js
true
The dummy S3ServiceException is not NoSuchKey error !!!
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
"@aws-sdk/client-s3": "^3.721.0"
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.18.1
Reproduction Steps
Minimal repro:
import { NoSuchKey, S3, S3ServiceException } from '@aws-sdk/client-s3';
const dummyS3ServiceException = new S3ServiceException({
name: 'TEST_ERROR',
message: 'TEST_MESSAGE',
$fault: 'server',
$metadata: {},
});
console.log(dummyS3ServiceException instanceof NoSuchKey)
Prints
bcd0740fa72c:testapp073 sobkamil$ node index.js
true
Observed Behavior
Exceptions are misscategorized with instaceof operator
Expected Behavior
console.log(dummyS3ServiceException instanceof NoSuchKey)
returns false
Possible Solution
Revert smithy-lang/smithy-typescript#1484
Additional Information/Context
No response
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p1This is a high priority issueThis is a high priority issuepending-releaseThis issue will be fixed by an approved PR that hasn't been released yet.This issue will be fixed by an approved PR that hasn't been released yet.potential-regressionMarking this issue as a potential regression to be checked by team memberMarking this issue as a potential regression to be checked by team member