Skip to content
Merged
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
10 changes: 8 additions & 2 deletions adafruit_wsgi/wsgi_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,14 @@ 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) as err:
raise RuntimeError(
"Proper HTTP response return not given for request handler '{}'".format(
route["func"].__name__
)
) from err
start_response(status, headers)
return resp_data

Expand Down