diff --git a/cashews/backends/redis/client.py b/cashews/backends/redis/client.py index 26c56927..2971b428 100644 --- a/cashews/backends/redis/client.py +++ b/cashews/backends/redis/client.py @@ -34,6 +34,10 @@ class SafeRedis(_Redis): async def execute_command(self, command, *args: Any, **kwargs: Any): try: return await super().execute_command(command, *args, **kwargs) + except NoScriptError: + # used by register_script functionality + # if we do not reraise it, than a Script wrapper will not work as expect + raise except ( RedisConnectionError, socket.gaierror,