nodece opened a new pull request, #19464: URL: https://github.com/apache/pulsar/pull/19464
### Motivation In the `AuthenticationFilter#doFilter`, `try...catch` catches all logic. When any error occurs, this filter always responds to the 401 error. For example, I request an incorrect URL: ``` INFO org.eclipse.jetty.server.RequestLog - 127.0.0.1 - - [04/Feb/2023:02:24:27 +0000] "GET /ws/v2/consumer/public/default/test-topic HTTP/1.1" 401 ``` This URL should be `/ws/v2/consumer/persistent/public/default/test-topic/your-subscription-name`. I expected a 500/400 error, not a 401 error. ### Modifications - Make `try...catch` only catch the `authenticateHttpRequest` logic ### Documentation <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> - [ ] `doc` <!-- Your PR contains doc changes. --> - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later --> - [x] `doc-not-needed` <!-- Your PR changes do not impact docs --> - [ ] `doc-complete` <!-- Docs have been already added --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
