-
-
Notifications
You must be signed in to change notification settings - Fork 829
-
-
Notifications
You must be signed in to change notification settings - Fork 829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_load_client_certs() should raise an error if cert
could not be handled.
#3301
Comments
Okay. Would you like to issue a pull request that'd raise a TypeError for that case? |
Happy to work on PR. Do you have a quick pointer where a related test should be added? I am not familar with the httpx codebase. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The code in
_load_client_certs
does not handle a cert path of typepathlib.Path
:Rather than silently discarding an unhandled type for
self.cert
here, it would be better to raise an exception (e.g.NotImplementedError
for an unsupported type forself.cert
.Background: we switched our code from
str
topydantic.FilePath
and suddenly the authentication part via a PEM did no longer work..and it took a long time to figure out that this was caused by the unhandled case here. An exception is more explicit than implicitly ignoring the problem (without reporting it).The text was updated successfully, but these errors were encountered: