Skip to content

Commit

Permalink
chore(types): add deprecation explanation to SdkError (#4437)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe authored Feb 15, 2023
1 parent fcf06c3 commit afee763
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/types/src/shapes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,16 @@ export interface SmithyException {

/**
* @deprecated
* @see https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/
*
* This type should not be used in your application.
* Users of the AWS SDK for JavaScript v3 service clients should prefer to
* use the specific Exception classes corresponding to each operation.
* These can be found as code in the deserializer for the operation's Command class,
* or as declarations in the service model file in codegen/sdk-codegen/aws-models.
*
* If no exceptions are enumerated by a particular Command operation,
* the base exception for the service should be used. Each client exports
* a base ServiceException prefixed with the service name.
*/
export type SdkError = Error & Partial<SmithyException> & Partial<MetadataBearer>;

0 comments on commit afee763

Please sign in to comment.