mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-10 15:22:24 -05:00
code review feedback and merge from main
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user