adafruit / Adafruit_CircuitPython_PortalBase

Base Library for the Portal-style libraries.
MIT License
18 stars 17 forks source link

Dealing with HTTP 500 Errors #81

Closed makermelissa closed 2 years ago

makermelissa commented 2 years ago

As stated in https://forums.adafruit.com/viewtopic.php?f=60&t=192584

The user was running into a 500 server error. It seems to be dying inside of network.py. I'm wondering if there's a better way to handle this or is it an error that we should leave as it is so the user can try/catch it?

tekktrik commented 2 years ago

I think it makes to have user code handle non-200 responses, since the remedy could be different depending on the use case. But maybe passing along the response in the error would be helpful in that case?