adafruit / Adafruit_CircuitPython_WSGI

WSGI library for simple web servers
MIT License
20 stars 18 forks source link

#16 use the request path in the exception #17

Closed dannystaple closed 2 years ago

dannystaple commented 2 years ago

Fixes #16. Output looks like:

Traceback (most recent call last):
  File "code.py", line 1, in <module>
  File "counting.py", line 23, in <module>
  File "robot_wifi.py", line 52, in start_wifi_server
  File "adafruit_esp32spi/adafruit_esp32spi_wsgiserver.py", line 105, in update_poll
  File "/lib/adafruit_wsgi/wsgi_app.py", line 74, in __call__
RuntimeError: Proper HTTP response return not given for request handler '/count'
tekktrik commented 2 years ago

Good solution! Want to update the accompanying text to something more about the "path" than the "request handler"? Actually I think "request handler for path" would be enough information to indicate that the issue is for the actual function while referencing it's path.