CircuitPython 8 supports exception chaining, so that the original problem can be shown. Here's how it looks on desktop python3:
Traceback (most recent call last):
File "/home/jepler/src/bundle/libraries/helpers/requests/adafruit_requests.py", line 527, in _get_socket
sock.connect((connect_host, port))
ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jepler/src/bundle/libraries/helpers/requests/adafruit_requests.py", line 721, in get
return self.request("GET", url, **kw)
File "/home/jepler/src/bundle/libraries/helpers/requests/adafruit_requests.py", line 661, in request
socket = self._get_socket(host, port, proto, timeout=timeout)
File "/home/jepler/src/bundle/libraries/helpers/requests/adafruit_requests.py", line 508, in _get_socket
raise RuntimeError("Sending request failed") from last_exc
RuntimeError: Sending request failed
Before, just the second block would be shown, and it would be hidden that the underlying cause was "connection refused".
CircuitPython 8 supports exception chaining, so that the original problem can be shown. Here's how it looks on desktop python3:
Before, just the second block would be shown, and it would be hidden that the underlying cause was "connection refused".