Closed ivan-shevtsov closed 3 months ago
Hi and thanks for reporting this!
If I understand this correctly this is just for the initial generated query that is commented out (and does not generate results). The console should work if you enter an actual query without comments, right? Just want to clarify this since you said that the "Console does not work".
However, I will now start testing with PSQL and change the handling of errors in order to avoid this problem.
@aileftech that is correct. Since jdbc driver has not got any data, it throw PSQLException and server responded with httpStatus=500. As a result, instead of Console I got a default tomcat error page
This should be fixed with the latest commit on the dev
branch.
Empty spring boot 3.1.5 application with -web and -data-jpa starters. Database: postgresql Snapadmin: 0.2.0
after launching I can see entity has been scanned and available at /admin. but Console does not work, since thrown exception 'org.postgresql.util.PSQLException' is not translated to TransientDataAccessResourceException.
I was able to address the issue by putting https://github.com/spring-projects/spring-framework/blob/main/spring-jdbc/src/main/resources/org/springframework/jdbc/support/sql-error-codes.xml with
but, maybe it make sense not to fall on initial (generated) sql... or at least somehow to show error on UI.