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
Hi, thanks for this great library. I just wanted to report a behavior that, in my opinion, is not very obvious: in the examples it is shown that to check for errors it's enough to check whether obj['error'] is True. But when the request is successful the key 'error' is not set at all which might lead to a KeyError.
Is there a reason why obj['error'] is not set to False if the request is successful instead of not being set at all? I would expect this behavior for error_code not for just error.
Thank you.
The text was updated successfully, but these errors were encountered:
Yes and that would technically, not conceptually, solve the problem. What I'm trying to say is that a first-time user of the library might not expect this behavior. Maybe this is a common good practice or pattern (apologies in case).
Hi, thanks for this great library. I just wanted to report a behavior that, in my opinion, is not very obvious: in the examples it is shown that to check for errors it's enough to check whether
obj['error'] is True
. But when the request is successful the key'error'
is not set at all which might lead to aKeyError
.Is there a reason why
obj['error']
is not set toFalse
if the request is successful instead of not being set at all? I would expect this behavior forerror_code
not for justerror
.Thank you.
The text was updated successfully, but these errors were encountered: