Skip to content

Commit

Permalink
Merge pull request #290 from wklken/fix_redundant_logging
Browse files Browse the repository at this point in the history
fix(logging/exception): remove redundant logging while handle the exceptions
  • Loading branch information
IMBlues authored Feb 24, 2022
2 parents 32cebb3 + 7940a09 commit 1def8a0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/api/bkuser_core/common/exception_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def get_ee_exception_response(exc, context):
elif isinstance(exc, AuthenticationFailed):
data["message"] = "403, authentication failed"
else:
logger.exception("request apiServer failed")
logger.exception("unknown exception while handling the request")
data["message"] = UNKNOWN_ERROR_HINT
data["code"] = -1

Expand All @@ -79,7 +79,6 @@ def get_ee_exception_response(exc, context):
setattr(response, "from_exception", True)
return response

logger.exception("request apiServer failed")
response = Response(data=data, status=EE_GENERAL_STATUS_CODE)
setattr(response, "from_exception", True)
return response
Expand Down

0 comments on commit 1def8a0

Please sign in to comment.