Skip to content

Commit

Permalink
added more logging for submit exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
abdollahis2 authored and abdollahis2 committed Jan 8, 2024
1 parent e506d64 commit 82d555f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tr_sys/tr_ars/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ def submit(req):
content_type='application/json', status=201)
except Exception as e:
logger.error("Unexpected error 10: {}".format(traceback.format_exception(type(e), e, e.__traceback__)))
return HttpResponse('Content is not JSON', status=400)
logging.info(e, exc_info=True)
logging.info('error message %s' % str(e))
logging.info(e.__cause__)
logging.error(type(e).__name__)
logging.error(e.args)
return HttpResponse(str(e.__cause__), status=400)

@csrf_exempt
def messages(req):
Expand Down

0 comments on commit 82d555f

Please sign in to comment.