-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Remove stack traces from HTTP responses #12938
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
base: main
Are you sure you want to change the base?
Conversation
Currently, only patch changes are allowed on main. Your PR labels (semver: minor) indicate that it cannot be merged into the main at this time. |
1 similar comment
Currently, only patch changes are allowed on main. Your PR labels (semver: minor) indicate that it cannot be merged into the main at this time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
general question: if we remove this, how does the devx look like for localstack developers? the stacktrace is added when DEBUG=1
is set so the stack traces appear in test failures directly, which has helped (at least me) in the past to find issues very quickly.
That's a good point: it returns the error directly in the client call, which allows the test annotation to show the error directly and not have to go through the logs of the running LocalStack instance. I think there's a fine line with the customer running with |
that's fair. so perhaps instead of removing the behavior (returning stack traces) all together, we could tie it to our tests being run. for example |
Motivation
As a part of the initiative for improving Localstack error messages, this PR aims to remove stack traces from HTTP responses.
Current Behaviour:
Expected Behaviour:
Changes
This PR excludes stack traces from HTTP responses when
DEBUG=1
mode is enabled, forDEBUG=0
we already do not log stack trace in the response.Testing
The changes have been tested locally by deliberately introducing an error by assigning
a = org[0]
indescribe_organization
handler and runawslocal organizations describe-organization
command.(It was discussed that for now manual local testing is enough and we do not need any specific test case to validate this.)
4.7.0
release.