Use logger.exception in app.py when request fails (#1570)

This commit is contained in:
Jonathan Zernik 2021-10-12 01:38:43 -07:00 committed by GitHub
parent eb52cc8bb1
commit 98bd5f9eb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,8 +83,7 @@ def create_app(handler, username, password):
reply = func(request_message)
return reply.SerializeToString()
except Exception as e:
logger.error(
"Error in handle admin web request.", exc_info=True)
logger.exception("Error in handle admin web request.")
return str(e), 500
return wrapper
return decorator