From 29b4009e5ee79383ecb2b2eed62d50e7aa132e19 Mon Sep 17 00:00:00 2001 From: Oleg Kasyanov Date: Thu, 23 Nov 2023 03:22:36 +0400 Subject: [PATCH] Added additional catchable exception code --- src/Db/PdoFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Db/PdoFactory.php b/src/Db/PdoFactory.php index 83b006f..f4d73c4 100644 --- a/src/Db/PdoFactory.php +++ b/src/Db/PdoFactory.php @@ -44,7 +44,7 @@ private function connect(array $config): PDO $code = (int) $exception->getCode(); throw match ($code) { - 1045 => new InvalidCredentialsException('Invalid database credentials (user, password)', $code), + 1045, 2054 => new InvalidCredentialsException('Invalid database credentials (user, password)', $code), 1049 => new InvalidDatabaseException('Unknown database', $code), default => new CommonException($exception->getMessage(), $code) };