Skip to content

Commit ca4bc23

Browse files
authored
Merge pull request #17 from dannystaple/16/use-request-path-in-exception
#16 use the request path in the exception
2 parents 58b06f2 + fb6cb46 commit ca4bc23

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

adafruit_wsgi/wsgi_app.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,8 @@ def __call__(self, environ: Dict[str, str], start_response: Callable):
7070
status, headers, resp_data = route["func"](request, *args)
7171
except (ValueError, TypeError) as err:
7272
raise RuntimeError(
73-
"Proper HTTP response return not given for request handler '{}'".format(
74-
route["func"].__name__
75-
)
73+
"Proper HTTP response not returned by request handler for path "
74+
+ f"'{request.path}'"
7675
) from err
7776
start_response(status, headers)
7877
return resp_data

0 commit comments

Comments
 (0)