Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(middleware-serde): mark error entry non-enumerable #3426

Merged
merged 1 commit into from Mar 16, 2022

Conversation

AllanZhengYP
Copy link
Contributor

Issue

Ref: D38831498

Description

The $response trait includes raw response for AWS service errors only. It's a low-risk that AWS service will include sensitive information in the error responses, but the possibility still exists.

This issue is scoped only with the logger, which means the logger should not print out the raw HTTP response for errors by default. This is because customer can access the raw HTTP response in variety of ways in the JavaScript SDK, we cannot prevent them from accessing potentially sensitive information.

This change makes the $response inenumerable makes sense here, so that the logger won't print the raw Http response by default. However, if customer need to access the raw Http response when handling the error, they can still access them specifically by error.$response.

Testing

Unit test


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@AllanZhengYP AllanZhengYP requested a review from a team as a code owner March 15, 2022 18:56
@AllanZhengYP AllanZhengYP merged commit c7cceb5 into aws:main Mar 16, 2022
@github-actions
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants