From 3fb0aa40cd0c06d208653d17d62c0ce2b358d6cc Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Wed, 29 May 2024 11:01:19 +0200 Subject: feat(db): add mapping for lock wait timeout Signed-off-by: Daniel Kesselberg --- lib/private/DB/Exceptions/DbalException.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/private/DB') diff --git a/lib/private/DB/Exceptions/DbalException.php b/lib/private/DB/Exceptions/DbalException.php index 81ee9c62a0f..05ea9e22a5d 100644 --- a/lib/private/DB/Exceptions/DbalException.php +++ b/lib/private/DB/Exceptions/DbalException.php @@ -17,6 +17,7 @@ use Doctrine\DBAL\Exception\DriverException; use Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException; use Doctrine\DBAL\Exception\InvalidArgumentException; use Doctrine\DBAL\Exception\InvalidFieldNameException; +use Doctrine\DBAL\Exception\LockWaitTimeoutException; use Doctrine\DBAL\Exception\NonUniqueFieldNameException; use Doctrine\DBAL\Exception\NotNullConstraintViolationException; use Doctrine\DBAL\Exception\RetryableException; @@ -82,6 +83,9 @@ class DbalException extends Exception { /** * Other server errors */ + if ($this->original instanceof LockWaitTimeoutException) { + return parent::REASON_LOCK_WAIT_TIMEOUT; + } if ($this->original instanceof DatabaseObjectExistsException) { return parent::REASON_DATABASE_OBJECT_EXISTS; } -- cgit v1.2.3