diff --git a/javascriptv3/example_code/s3/tests/copy-object.unit.test.js b/javascriptv3/example_code/s3/tests/copy-object.unit.test.js index 3c0a56dec30..8cefcf799e2 100644 --- a/javascriptv3/example_code/s3/tests/copy-object.unit.test.js +++ b/javascriptv3/example_code/s3/tests/copy-object.unit.test.js @@ -38,8 +38,8 @@ describe("copy-object", () => { it("should log a relevant error message if the object is in an archive tier", async () => { const error = new ObjectNotInActiveTierError(); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 send.mockRejectedValue(error); const spy = vi.spyOn(console, "error"); diff --git a/javascriptv3/example_code/s3/tests/create-bucket.unit.test.js b/javascriptv3/example_code/s3/tests/create-bucket.unit.test.js index 567bd452645..f0a8c7856a0 100644 --- a/javascriptv3/example_code/s3/tests/create-bucket.unit.test.js +++ b/javascriptv3/example_code/s3/tests/create-bucket.unit.test.js @@ -34,8 +34,8 @@ describe("create-bucket", () => { it("should log a relevant error message if a bucket already exists globally", async () => { const error = new BucketAlreadyExists(); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 send.mockRejectedValue(error); const spy = vi.spyOn(console, "error"); @@ -49,8 +49,8 @@ describe("create-bucket", () => { it("should log a relevant error message if a bucket already exists in the users AWS account", async () => { const error = new BucketAlreadyOwnedByYou(); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 send.mockRejectedValue(error); const spy = vi.spyOn(console, "error"); diff --git a/javascriptv3/example_code/s3/tests/delete-bucket-policy.unit.test.js b/javascriptv3/example_code/s3/tests/delete-bucket-policy.unit.test.js index 3204c62c093..d16ff1e99bb 100644 --- a/javascriptv3/example_code/s3/tests/delete-bucket-policy.unit.test.js +++ b/javascriptv3/example_code/s3/tests/delete-bucket-policy.unit.test.js @@ -33,8 +33,8 @@ describe("delete-bucket-policy", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "NoSuchBucket"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); @@ -50,8 +50,8 @@ describe("delete-bucket-policy", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/delete-bucket-website.unit.test.js b/javascriptv3/example_code/s3/tests/delete-bucket-website.unit.test.js index 0eba74a0773..b594fd3b25e 100644 --- a/javascriptv3/example_code/s3/tests/delete-bucket-website.unit.test.js +++ b/javascriptv3/example_code/s3/tests/delete-bucket-website.unit.test.js @@ -21,8 +21,8 @@ const { main } = await import("../actions/delete-bucket-website.js"); describe("delete-bucket-website", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "NoSuchBucket"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); @@ -38,8 +38,8 @@ describe("delete-bucket-website", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/delete-bucket.unit.test.js b/javascriptv3/example_code/s3/tests/delete-bucket.unit.test.js index 6fb4400bed7..dd756c74ef6 100644 --- a/javascriptv3/example_code/s3/tests/delete-bucket.unit.test.js +++ b/javascriptv3/example_code/s3/tests/delete-bucket.unit.test.js @@ -31,8 +31,8 @@ describe("delete-bucket", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "NoSuchBucket"; send.mockRejectedValueOnce(error); @@ -47,8 +47,8 @@ describe("delete-bucket", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/delete-object.unit.test.js b/javascriptv3/example_code/s3/tests/delete-object.unit.test.js index ee0363481c3..f84d8aaebc8 100644 --- a/javascriptv3/example_code/s3/tests/delete-object.unit.test.js +++ b/javascriptv3/example_code/s3/tests/delete-object.unit.test.js @@ -34,8 +34,8 @@ describe("delete-object", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "NoSuchBucket"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); @@ -51,8 +51,8 @@ describe("delete-object", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/delete-objects.unit.test.js b/javascriptv3/example_code/s3/tests/delete-objects.unit.test.js index 3ba71982993..17013d288bb 100644 --- a/javascriptv3/example_code/s3/tests/delete-objects.unit.test.js +++ b/javascriptv3/example_code/s3/tests/delete-objects.unit.test.js @@ -36,8 +36,8 @@ describe("delete-objects", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "NoSuchBucket"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); @@ -53,8 +53,8 @@ describe("delete-objects", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/get-bucket-acl.unit.test.js b/javascriptv3/example_code/s3/tests/get-bucket-acl.unit.test.js index 32e9e7a610e..73a4312182d 100644 --- a/javascriptv3/example_code/s3/tests/get-bucket-acl.unit.test.js +++ b/javascriptv3/example_code/s3/tests/get-bucket-acl.unit.test.js @@ -36,8 +36,8 @@ describe("get-bucket-acl", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "NoSuchBucket"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); @@ -53,8 +53,8 @@ describe("get-bucket-acl", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/get-bucket-cors.unit.test.js b/javascriptv3/example_code/s3/tests/get-bucket-cors.unit.test.js index 613f94cd06d..a4d6f8a75ed 100644 --- a/javascriptv3/example_code/s3/tests/get-bucket-cors.unit.test.js +++ b/javascriptv3/example_code/s3/tests/get-bucket-cors.unit.test.js @@ -49,8 +49,8 @@ describe("get-bucket-cors", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "NoSuchBucket"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); @@ -66,8 +66,8 @@ describe("get-bucket-cors", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/get-bucket-policy.unit.test.js b/javascriptv3/example_code/s3/tests/get-bucket-policy.unit.test.js index 9c22f07c2c1..779d15f3daf 100644 --- a/javascriptv3/example_code/s3/tests/get-bucket-policy.unit.test.js +++ b/javascriptv3/example_code/s3/tests/get-bucket-policy.unit.test.js @@ -33,8 +33,8 @@ describe("get-bucket-policy", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "NoSuchBucket"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); @@ -50,8 +50,8 @@ describe("get-bucket-policy", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/get-bucket-website.unit.test.js b/javascriptv3/example_code/s3/tests/get-bucket-website.unit.test.js index 2478cfca7dc..346e7e2e03b 100644 --- a/javascriptv3/example_code/s3/tests/get-bucket-website.unit.test.js +++ b/javascriptv3/example_code/s3/tests/get-bucket-website.unit.test.js @@ -38,8 +38,8 @@ describe("get-bucket-website", () => { it("should log a relevant error when the bucket isn't configured as a website.", async () => { const error = new S3ServiceException("Not such website configuration."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "NoSuchWebsiteConfiguration"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); @@ -55,8 +55,8 @@ describe("get-bucket-website", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/get-object-lock-configuration.unit.test.js b/javascriptv3/example_code/s3/tests/get-object-lock-configuration.unit.test.js index 7d2ae1b3b9a..32babfacbba 100644 --- a/javascriptv3/example_code/s3/tests/get-object-lock-configuration.unit.test.js +++ b/javascriptv3/example_code/s3/tests/get-object-lock-configuration.unit.test.js @@ -33,8 +33,8 @@ describe("get-object-lock-configuration", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "NoSuchBucket"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); @@ -50,8 +50,8 @@ describe("get-object-lock-configuration", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/get-object.unit.test.js b/javascriptv3/example_code/s3/tests/get-object.unit.test.js index 632a80126ee..9e45337a733 100644 --- a/javascriptv3/example_code/s3/tests/get-object.unit.test.js +++ b/javascriptv3/example_code/s3/tests/get-object.unit.test.js @@ -39,8 +39,8 @@ describe("get-object", () => { const bucketName = "amzn-s3-demo-bucket"; const key = "foo"; const error = new NoSuchKey(); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 send.mockRejectedValueOnce(error); const spy = vi.spyOn(console, "error"); @@ -54,8 +54,8 @@ describe("get-object", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; const key = "foo"; diff --git a/javascriptv3/example_code/s3/tests/list-buckets.unit.test.js b/javascriptv3/example_code/s3/tests/list-buckets.unit.test.js index 9b7853368cc..327542e3304 100644 --- a/javascriptv3/example_code/s3/tests/list-buckets.unit.test.js +++ b/javascriptv3/example_code/s3/tests/list-buckets.unit.test.js @@ -33,8 +33,8 @@ describe("list-buckets", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; paginateListBuckets.mockImplementationOnce( diff --git a/javascriptv3/example_code/s3/tests/list-objects.unit.test.js b/javascriptv3/example_code/s3/tests/list-objects.unit.test.js index b4e6ecac771..9804ed730cf 100644 --- a/javascriptv3/example_code/s3/tests/list-objects.unit.test.js +++ b/javascriptv3/example_code/s3/tests/list-objects.unit.test.js @@ -31,8 +31,8 @@ describe("list-objects", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "NoSuchBucket"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); @@ -48,8 +48,8 @@ describe("list-objects", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/put-bucket-acl.unit.test.js b/javascriptv3/example_code/s3/tests/put-bucket-acl.unit.test.js index 1b6e4275a05..ef27701ab38 100644 --- a/javascriptv3/example_code/s3/tests/put-bucket-acl.unit.test.js +++ b/javascriptv3/example_code/s3/tests/put-bucket-acl.unit.test.js @@ -39,8 +39,8 @@ describe("put-bucket-acl", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "NoSuchBucket"; send.mockRejectedValueOnce(error); @@ -61,8 +61,8 @@ describe("put-bucket-acl", () => { const error = new S3ServiceException({ message: "Some S3 service exception", }); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/put-bucket-cors.unit.test.js b/javascriptv3/example_code/s3/tests/put-bucket-cors.unit.test.js index a4bf69ea2f7..4672e392a32 100644 --- a/javascriptv3/example_code/s3/tests/put-bucket-cors.unit.test.js +++ b/javascriptv3/example_code/s3/tests/put-bucket-cors.unit.test.js @@ -33,8 +33,8 @@ describe("put-bucket-cors", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "NoSuchBucket"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); @@ -50,8 +50,8 @@ describe("put-bucket-cors", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/put-bucket-policy.unit.test.js b/javascriptv3/example_code/s3/tests/put-bucket-policy.unit.test.js index a7bac4e77d9..ad88f04420d 100644 --- a/javascriptv3/example_code/s3/tests/put-bucket-policy.unit.test.js +++ b/javascriptv3/example_code/s3/tests/put-bucket-policy.unit.test.js @@ -34,8 +34,8 @@ describe("put-bucket-policy", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); error.name = "MalformedPolicy"; - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); @@ -50,8 +50,8 @@ describe("put-bucket-policy", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/put-bucket-website.unit.test.js b/javascriptv3/example_code/s3/tests/put-bucket-website.unit.test.js index a9f45a46a5b..561b1fee142 100644 --- a/javascriptv3/example_code/s3/tests/put-bucket-website.unit.test.js +++ b/javascriptv3/example_code/s3/tests/put-bucket-website.unit.test.js @@ -33,8 +33,8 @@ describe("put-bucket-website", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "NoSuchBucket"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); @@ -50,8 +50,8 @@ describe("put-bucket-website", () => { it("should indicate a failure came from S3 when the error isn't generic", async () => { const error = new S3ServiceException("Some S3 service exception."); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); diff --git a/javascriptv3/example_code/s3/tests/put-object.unit.test.js b/javascriptv3/example_code/s3/tests/put-object.unit.test.js index d4cd02302ef..0a43e994159 100644 --- a/javascriptv3/example_code/s3/tests/put-object.unit.test.js +++ b/javascriptv3/example_code/s3/tests/put-object.unit.test.js @@ -41,8 +41,8 @@ describe("put-object", () => { it("should log a relevant error when the bucket doesn't exist", async () => { const error = new S3ServiceException("The specified bucket does not exist"); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "EntityTooLarge"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error); @@ -66,8 +66,8 @@ or the multipart upload API (5TB max).`, const error = new S3ServiceException({ message: "Some S3 service exception.", }); - error.$fault = "server"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers - error.$metadata = "metadata"; // Workaround until PR is released. https://code.amazon.com/reviews/CR-171722725/revisions/1#/reviewers + error.$fault = "server"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 + error.$metadata = "metadata"; // Workaround until PR is released. https://github.com/smithy-lang/smithy-typescript/pull/1503 error.name = "ServiceException"; const bucketName = "amzn-s3-demo-bucket"; send.mockRejectedValueOnce(error);