-
Notifications
You must be signed in to change notification settings - Fork 646
Closed
Labels
feature-requestNew feature or enhancement. May require GitHub community feedback.New feature or enhancement. May require GitHub community feedback.
Description
Is your feature request related to a problem? Please describe.
Currently we generate a namespace and a filterSensitiveLog() for each of the exception shape, for example:
aws-sdk-js-v3/clients/client-acm/src/models/models_0.ts
Lines 102 to 109 in e0025cd
| export namespace InvalidParameterException { | |
| /** | |
| * @internal | |
| */ | |
| export const filterSensitiveLog = (obj: InvalidParameterException): any => ({ | |
| ...obj, | |
| }); | |
| } |
They are not used because filterSensitiveLog() is only called in loggerMiddleware where exceptions are not logged:
aws-sdk-js-v3/packages/middleware-logger/src/loggerMiddleware.ts
Lines 33 to 34 in f4c8f09
| input: inputFilterSensitiveLog(args.input), | |
| output: outputFilterSensitiveLog(outputWithoutMetadata), |
Because namespace in TS is not tree-shake-able, these useless functions are left in customers productions code too.
Describe the solution you'd like
Since they are internal APIs and not used anyware, we should remove them. It can reduce in customers' bundling size too.
Metadata
Metadata
Assignees
Labels
feature-requestNew feature or enhancement. May require GitHub community feedback.New feature or enhancement. May require GitHub community feedback.