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

UnhandledException not cleared when Interceptor handles exception #6677

Open
lawley opened this issue Feb 4, 2025 · 1 comment
Open

UnhandledException not cleared when Interceptor handles exception #6677

lawley opened this issue Feb 4, 2025 · 1 comment

Comments

@lawley
Copy link
Contributor

lawley commented Feb 4, 2025

In the RestfulServer there are two places (lines 1220 and 1282) where the Pointcut.SERVER_HANDLE_EXCEPTION interceptor is called and if it returns false (signifying that the exception has been "handled"), the handleRequest method then returns.

However, it doesn't clear the variable unhandledException before doing so which means the finally block then attempts to (re-)handle the exception. This can result it another exception being thrown as a second attempt is made to write an output result.

I believe the fix is to add:

`unhandledException = null;`

before each of these return statements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants