aws-sdk-js-v3 icon indicating copy to clipboard operation
aws-sdk-js-v3 copied to clipboard

No ResourceNotFoundException in @aws-sdk/client-s3

Open trevorr opened this issue 3 years ago • 1 comments

Describe the issue with documentation

This documentation indicates that ResourceNotFoundException is available for the S3 client: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3/classes/resourcenotfoundexception.html

I'd like to check for that error in Typescript as described here: https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/

Steps to reproduce

Run npm install @aws-sdk/client-s3:

  "dependencies": {
    "@aws-sdk/client-s3": "^3.76.0",

Import ResourceNotFoundException:

import { ResourceNotFoundException } from "@aws-sdk/client-s3";

Observed behavior

Module '"@aws-sdk/client-s3"' has no exported member 'ResourceNotFoundException'. ts(2305)

Expected behavior

ResourceNotFoundException would be imported and available for instanceof checks.

trevorr avatar Apr 24 '22 21:04 trevorr

you can use NotFound or other exceptions that are defined inside:

  • https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-s3/src/models/models_0.ts
  • https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-s3/src/models/models_1.ts

rayandrew avatar Jul 16 '22 03:07 rayandrew

Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue.

github-actions[bot] avatar Mar 27 '24 00:03 github-actions[bot]

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[bot] avatar Apr 14 '24 00:04 github-actions[bot]