From 6054d82281360efa2f95d8cbf311499a28c4a9c6 Mon Sep 17 00:00:00 2001 From: Damien Diederen Date: Thu, 13 Apr 2023 10:33:27 +0200 Subject: [PATCH] fix(exceptions): Register exception for server-side QUOTAEXCEEDED(-125) Without this, the out-of-quota conditions cause Kazoo's request handling thread to die, and the application is left waiting for a non-existent reply and/or does not receive any clue that its Kazoo client handle is not functional anymore. --- kazoo/exceptions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kazoo/exceptions.py b/kazoo/exceptions.py index 1307463c..515a61e9 100644 --- a/kazoo/exceptions.py +++ b/kazoo/exceptions.py @@ -187,6 +187,11 @@ class NotReadOnlyCallError(ZookeeperError): a read-only server""" +@_zookeeper_exception(-125) +class QuotaExceededError(ZookeeperError): + """Exceeded the quota that was set on the path""" + + class ConnectionClosedError(SessionExpiredError): """Connection is closed"""