mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
revert: keep narrow RedisException catch on lock acquire
Reverts the catch widening from earlier — the underlying Utopia\Lock\Distributed::tryAcquire only calls ext-redis methods, which throw RedisException exclusively. Catching Throwable was over-broad and would silently swallow real bugs (TypeError, Error) into a fail-open path.
This commit is contained in:
@@ -129,7 +129,7 @@ final class Lock
|
||||
|
||||
try {
|
||||
$acquired = $orFail ? $lock->acquire($waitTimeout) : $lock->tryAcquire();
|
||||
} catch (Throwable $e) {
|
||||
} catch (\RedisException $e) {
|
||||
$this->attempts->add(1, ['outcome' => 'backend_error', ...$labels]);
|
||||
$this->reportError('backend_error', $key, $target, $e);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user