-
Notifications
You must be signed in to change notification settings - Fork 43
JooqExceptionTranslator loses underlying exception message if SQL state code is unknown #761
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
Ah I think the changes in the referenced PR didn't end up being merged, I believe instead that this is the correct commit |
Okay, while investigating this I attempted to override the I changed the Still, I'm a bit confused about what the proper setup is. The docs now say to specify:
But I have the following which looks like it was the way from v3 docs (other than
If I use the new recommended method I get an exception about entities missing:
This looks to be some configuration that is now required but wasn't previously. I don't see this mentioned in the release notes though. Any advice would be appreciated to get the equivalent of the old behaviour without breaking anything |
Okay so I realized I was looking in the wrong section for the current docs. Likely the JDBC section would be more applicable, but that still doesn't get me both the Transaction Manager working with I do think this still shows in a way that it's tricky to get transactions set up properly with JOOQ and Micronaut-SQL (see #558). I will comment there and close this. Sorry for the mixup |
Expected Behavior
Queries that fail should always result in an exception with relevant information about what went wrong. This should happen even if the state code is unknown.
I believe this is the same issue reported in spring-boot#25717. As in that case, I believe the change from PR spring-boot#25493 to the if-block in JooqExceptionTranslator#handle would solve the issue.
Actual Behaviour
For some database errors, the underlying error message from the database is discarded and you get an "Unspecified RuntimeException" message.
Steps To Reproduce
I unfortunately do not have a full repro right now, but I'm guessing the one reported at JOOQ#12708 would work:
If you need more information I can look into it, but I'm hoping it's obvious that this change is needed given the existing change to Spring Boot.
Environment Information
No response
Example Application
No response
Version
v3.7.4
The text was updated successfully, but these errors were encountered: