Skip to content

Commit 83d320d

Browse files
committed
HERESUP-46139: Fix handling of SQLExceptions with code "XX000"
Treat unknown errors as unknown exceptions rather than throwing timeout exceptions Signed-off-by: Benjamin Rögner <[email protected]>
1 parent 59a1fd1 commit 83d320d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xyz-psql-connector/src/main/java/com/here/xyz/psql/PSQLXyzConnector.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ private void checkSQLException(SQLException e, String table) throws ErrorRespons
281281
throw new ErrorResponseException(ILLEGAL_ARGUMENT, "dataset contains invalid geometries");
282282
if (e.getMessage().indexOf("ERROR: can not mix dimensionality in a geometry") != -1)
283283
throw new ErrorResponseException(ILLEGAL_ARGUMENT, "can not mix dimensionality in a geometry");
284-
//fall thru - timeout assuming timeout
284+
else
285+
throw new ErrorResponseException(EXCEPTION, "Unexpected database error occurred: " + e.getMessage(), e);
285286

286287
case "57014": //57014 - query_canceled
287288
case "57P01": //57P01 - admin_shutdown

0 commit comments

Comments
 (0)