From 078ef62eb87fd27bef1494779777cd807a852501 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 12 Mar 2025 16:35:47 +0100 Subject: [PATCH] fix(database): handle unsupported database types in StartDatabaseProxy Added a default case to the switch statement in StartDatabaseProxy to throw an exception for unsupported database types. This change improves error handling and ensures that only valid database types are processed, enhancing the robustness of the database proxy functionality. --- app/Actions/Database/StartDatabaseProxy.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Actions/Database/StartDatabaseProxy.php b/app/Actions/Database/StartDatabaseProxy.php index 8d7d1ce2e..3b36e9b70 100644 --- a/app/Actions/Database/StartDatabaseProxy.php +++ b/app/Actions/Database/StartDatabaseProxy.php @@ -40,6 +40,7 @@ class StartDatabaseProxy 'standalone-redis', 'standalone-keydb', 'standalone-dragonfly' => 6379, 'standalone-clickhouse' => 9000, 'standalone-mongodb' => 27017, + default => throw new \Exception("Unsupported database type: $databaseType"), }; $configuration_dir = database_proxy_dir($database->uuid);