Fix object 404 exception handler logging

This commit is contained in:
Tanner Collin 2023-01-03 20:11:43 +00:00
parent 3ec76e4cfd
commit dea75cf019

View File

@ -476,7 +476,10 @@ def gen_member_forms(member):
def custom_exception_handler(exc, context): def custom_exception_handler(exc, context):
response = exception_handler(exc, context) response = exception_handler(exc, context)
if response is not None: if response is not None:
logging.warning('Response: %s', json.dumps(exc.detail)) if hasattr(exc, 'detail'):
logging.warning('Response: %s', json.dumps(exc.detail))
else:
logging.warning('Response: %s', exc)
return response return response
def log_transaction(tx): def log_transaction(tx):