-
Notifications
You must be signed in to change notification settings - Fork 644
Closed
Labels
bugThis issue is a bug.This issue is a bug.closed-for-stalenessp1This is a high priority issueThis is a high priority issuepotential-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
Since v3.931.0 S3 Client's thrown errors not always include Code and some other properties
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/client-s3@3.931.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v22.21.1
Reproduction Steps
import { NoSuchUpload, S3 } from "@aws-sdk/client-s3";
const client = new S3();
try {
await client.abortMultipartUpload({ Bucket: "my-bucket", Key: "my-key", UploadId: "this is a valid upload id" });
await client.abortMultipartUpload({ Bucket: "my-bucket", Key: "my-key", UploadId: "invalid id" });
} catch (error: any) {
// "Code" is undefined
if (error.Code == "NoSuchUpload") {
console.log(error.UploadId);
}
// well ...
if (error instanceof NoSuchUpload) {
// UploadId is undefined too!
console.log(error.UploadId);
}
}Observed Behavior
error instance is missing important informations
Expected Behavior
For this example, error should include at least UploadId as before
Possible Solution
No response
Additional Information/Context
No response
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.closed-for-stalenessp1This is a high priority issueThis is a high priority issuepotential-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