improve error handling

This commit is contained in:
Kenneth Kehl
2025-09-03 10:33:27 -07:00
parent d1a4827589
commit c6e1e662ad
2 changed files with 11 additions and 1 deletions

View File

@@ -80,6 +80,7 @@ class RedisClient:
try:
return self.scripts["delete-keys-by-pattern"](args=[pattern])
except Exception as e:
current_app.logger.exception(f"Exception in delete_by_pattern pattern={pattern}")
self.__handle_exception(
e, raise_exception, "delete-by-pattern", pattern
)
@@ -129,6 +130,7 @@ class RedisClient:
result = pipe.execute()
return result[2] > limit
except Exception as e:
current_app.logger.exception(f"Exception in exceeded_rate_limit cache_key {cache_key} limit = {limit}")
self.__handle_exception(
e, raise_exception, "rate-limit-pipeline", cache_key
)