Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions chalice/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,12 +668,12 @@ def _get_view_function_response(self, view_function, function_args):
status_code=e.STATUS_CODE)
except Exception as e:
headers = {}
self.log.error("Caught exception for %s", view_function,
exc_info=True)
if self.debug:
# If the user has turned on debug mode,
# we'll let the original exception propogate so
# we'll let the original exception propagate so
# they get more information about what went wrong.
self.log.debug("Caught exception for %s", view_function,
exc_info=True)
stack_trace = ''.join(traceback.format_exc())
body = stack_trace
headers['Content-Type'] = 'text/plain'
Expand Down