jerryshao commented on code in PR #8513:
URL: https://github.com/apache/gravitino/pull/8513#discussion_r2339464711
##########
catalogs/catalog-jdbc-postgresql/src/main/java/org/apache/gravitino/catalog/postgresql/converter/PostgreSqlExceptionConverter.java:
##########
@@ -44,8 +44,12 @@ public GravitinoRuntimeException
toGravitinoException(SQLException se) {
return new NoSuchSchemaException(se.getMessage(), se);
case "42P01":
return new NoSuchTableException(se.getMessage(), se);
- default:
+ default: {
+ if (se.getSQLState().startsWith("08")) {
+ return new ConnectionFailedException(se.getMessage(), se);
+ }
return new GravitinoRuntimeException(se.getMessage(), se);
+ }
Review Comment:
The purpose of `ConnectionFailedException` is for catalog connection test.
Here, I think RuntimeException and IOException are more suitable.
--
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]