-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add proper error handling to findBy
method in JdbcOAuth2AuthorizationService
#1579
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
Comments
Hi @Suvink!
The I'm going to close this issue for now as I don't think I agree with adding If you're still having trouble, please ensure you have enabled trace logging during development as demonstrated in the Getting Started example and I believe you will have an easier time tracking down these issues. If I'm missing details please let me know. If you have another specific suggestion for improving the debugging situation for this case, please open a new issue. |
Hey @sjohnr,
I see. I didn't know about this. Thanks.
I agree. The user has to provide the mixin and solve the issue.
After getting to know about At the moment, I don't have any proposals on top of my mind but I'll do some research and create a new issue when I have something solid. |
Hi @Suvink, thanks for following up!
Typically, this error should be caught at the highest level of the servlet stack and logged as an uncaught exception to prevent the servlet thread from terminating. Are you sure it didn't get logged at all? That doesn't seem to make sense to me. I have tested this myself by generating an From my perspective, handling runtime exceptions at the framework level will cover bugs that need to be addressed at development time. Since this is a bug in your configuration (or in this case missing configuration) and is a development-time issue which does get logged eventually, I don't think we will add anything here. |
Describe the bug
I recently came across the
java.lang.IllegalArgumentException
in Authorization Code flow withJdbcOAuth2AuthorizationService
. More info on the issue has been discussed in #397.While investigating this issue, I could not identify the exact point that this error pops up and had to add debug points and struggle to identify the line that was failing.
Upon inspecting the code, I noticed in the
findBy
method, a try block is used without a catch block.It would be easy to identify the error if we can have a catch block and handle this error properly.
To Reproduce
Please refer to #397.
Expected behavior
Handle the errors in
findBy
method with a catch block.Sample
Reports that include a sample will take priority over reports that do not.
At times, we may require a sample, so it is good to try and include a sample up front.
The text was updated successfully, but these errors were encountered: