Skip to content
Merged
Changes from 4 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
8 changes: 6 additions & 2 deletions adafruit_wsgi/wsgi_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@ def __call__(self, environ: Dict[str, str], start_response: Callable):

if match:
args, route = match
status, headers, resp_data = route["func"](request, *args)

try:
status, headers, resp_data = route["func"](request, *args)
except ValueError, TypeError:
raise RuntimeError(
"Proper HTTP response return not given for request handler '{}'".format(
route["func"].__name__
start_response(status, headers)
return resp_data

Expand Down