Closed tyroneyu closed 1 year ago
Nice! While we are at it, can we add this loop at other places where we are catching this exception as well?
I only see one spot where we "catch" this exception. The other areas just check and rethrow the exception. In those try blocks, they all call ByeBufferSpanPair.captureBody
and that is where the exception is thrown.
I'm going to merge this and open a new jira to track the snyk error work. I think it's a bigger/wider ranging effort.
Description
Please include a summary of the change, motivation and context.
When a filter blocks a request (eg. traceable filter), the http code returned is 500. It should be 403. The happens when the exception that we throw is nested and we are not catching it properly. This can be produced when used the spring framework as an app.
Testing
Manual tested with a spring framework app
Checklist: