diff --git a/core/signatures.py b/core/signatures.py index 7abd294..9af5085 100644 --- a/core/signatures.py +++ b/core/signatures.py @@ -249,10 +249,10 @@ class HttpSignature: content=body_bytes, follow_redirects=method == "get", ) - except SSLError as e: + except SSLError as invalid_cert: # Not our problem if the other end doesn't have proper SSL - print(f"{uri} {e}") - raise SSLCertVerificationError(e) + print(f"{uri} {invalid_cert}") + raise SSLCertVerificationError(invalid_cert) from invalid_cert except InvalidCodepoint as ex: # Convert to a more generic error we handle raise httpx.HTTPError(f"InvalidCodepoint: {str(ex)}") from None