You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the def _get_connected_socket( method inside the if is_ssl the ssl_context.wrap_socket() call will raise an exception without any message making it difficult for downstream users to identify why they are getting an exception.
Recommend catching exception and raising with a more meaningful message to make it easier for downstream users.
Something along the lines of:
if is_ssl:
try:
socket = ssl_context.wrap_socket(socket, server_hostname=host)
except Exception as error:
# if error is null / blank raise exception with a more meaningful message)
if not str(error):
raise RuntimeError("ssl_context could not wrap_socket")
raise error
connect_host = host
else:
connect_host = addr_info[-1][0]
The text was updated successfully, but these errors were encountered:
It would also be nice to know why ssl_context is throwing as well, but that file is embedded and I have yet to trace it.
I am on a pico w with circuitpython 9.2.1 connecting to https://swd.weatherflow.com/swd/rest/observations/station/52477?token=redacted this use with requests prior to them switching to using the connection manager.
In the
def _get_connected_socket(
method inside theif is_ssl
thessl_context.wrap_socket()
call will raise an exception without any message making it difficult for downstream users to identify why they are getting an exception.Recommend catching exception and raising with a more meaningful message to make it easier for downstream users.
Something along the lines of:
The text was updated successfully, but these errors were encountered: