mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 14:29:25 -04:00
improve error handling
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user