Clear usage errors when incorrect auth packages are applied. #1559
Unanswered
lovelydinosaur
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Prompted by this issue... #1558
It's a fairly easy user error for users to attempt to apply a
requestsauth package to anhttpxclient. Understandable that folks might try to do that. Question is, could this be something worth handling with clearer error messaging (or not)?Note that the traceback on that issue only fails as a result of duck typing. It'd be clearer if we raised a
TypeErrorat the point an invalid auth is applied to the client...Of course there's a wider question that this raises regarding type checking on our interfaces as a whole, when to provide for strict
TypeErrorraising, and when to just suck it up and expect our users to use the package as intended. Trade off being that adding stricter type checking brings a little extra gumpf into our codebase, which makes it a little more complex for users digging under the hood perhaps?Beta Was this translation helpful? Give feedback.
All reactions