diff --git a/src/Database/Adapter/MariaDB.php b/src/Database/Adapter/MariaDB.php index cc7b5338c..ecfe4e3d5 100644 --- a/src/Database/Adapter/MariaDB.php +++ b/src/Database/Adapter/MariaDB.php @@ -798,8 +798,7 @@ public function createIndex(string $collection, string $id, string $type, array ->prepare($sql) ->execute(); } catch (PDOException $e) { - $this->processException($e); - return false; + throw $this->processException($e); } } diff --git a/src/Database/Adapter/Postgres.php b/src/Database/Adapter/Postgres.php index 65d5c076e..2ef065d7b 100644 --- a/src/Database/Adapter/Postgres.php +++ b/src/Database/Adapter/Postgres.php @@ -851,8 +851,7 @@ public function createIndex(string $collection, string $id, string $type, array ->prepare($sql) ->execute(); } catch (PDOException $e) { - $this->processException($e); - return false; + throw $this->processException($e); } }