Skip to content

Commit 34d27ef

Browse files
Akanksha-kediaebyhr
authored andcommitted
Throw exception when failed to parse backend URL config
1 parent bf86bae commit 34d27ef

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gateway-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsJdbcMonitor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ public ClusterStats monitor(ProxyBackendConfiguration backend)
7878
properties.setProperty("SSL", String.valueOf(parsedUrl.getProtocol().equals("https")));
7979
}
8080
catch (MalformedURLException e) {
81-
log.error("could not parse backend url %s ", url);
82-
return clusterStats.build(); // TODO Invalid configuration should fail
81+
throw new IllegalArgumentException("Invalid backend URL: " + url, e);
8382
}
8483

8584
try (Connection conn = DriverManager.getConnection(jdbcUrl, properties);

0 commit comments

Comments
 (0)