-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Remove stack traces from web API calls. #5070
Remove stack traces from web API calls. #5070
Conversation
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.
In all places where you do unwrap now, I would consider logging the full error with the stack trace so this information is available for debugging in the logs.
@r0mant, I think that I'm not going to use the Unwrap approach at all. The problem is that Unwrap changes the structure of the response considerably. Before Unwrap:
After Unwrap:
The change above will most likely require changes for the clients of the API. This doesn't sound good to me. |
@lenko-d Yeah, we definitely shouldn't change the response structure, you can just return the same structure but without traces included. |
…ces disabled in web API responses due to security requirements.
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.
Looks fine to me once Dima's nitpick is addressed.
…it should not matter whether the strack traces are sent over the wire.
…in the original code.
…it should not matter whether the strack traces are sent over the wire.
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.
lgtm
This PR unwraps errors in order to remove stack traces from web API calls.
Testing done
Verification of the APIs
Verified that the following APIs don't return the stacktraces: