code review feedback and merge from main

This commit is contained in:
Kenneth Kehl
2024-09-11 09:39:18 -07:00
34 changed files with 256 additions and 161 deletions

View File

@@ -166,7 +166,7 @@ class RedisClient:
def __handle_exception(self, e, raise_exception, operation, key_name):
current_app.logger.exception(
"Redis error performing {} on {}".format(operation, key_name), exc_info=True
"Redis error performing {} on {}".format(operation, key_name)
)
if raise_exception:
raise e

View File

@@ -81,11 +81,11 @@ class ResponseHeaderMiddleware(object):
return self._app(environ, rewrite_response_headers)
except BaseException as be: # noqa
if "AuthError" in str(be): # notify-api-1135
current_app.logger.error("AuthError", exc_info=True)
current_app.logger.exception("AuthError")
elif "AttributeError" in str(be): # notify-api-1394
current_app.logger.error("AttributeError", exc_info=True)
current_app.logger.exception("AttributeError")
elif "MethodNotAllowed" in str(be): # notify-admin-1392
current_app.logger.error("MethodNotAllowed", exc_info=True)
current_app.logger.exception("MethodNotAllowed")
else:
raise be

View File

@@ -57,7 +57,7 @@ def s3upload(
try:
key.put(**put_args)
except botocore.exceptions.ClientError as e:
current_app.logger.error("Unable to upload file to S3 bucket", exc_info=True)
current_app.logger.exception("Unable to upload file to S3 bucket")
raise e