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
Use case:
We use HttpX for testing and we would like to check if response returns error similar to how we check if the request was successful.status_code). That way we do not have to do two types of checks, assert for successful requests and try/catch for errors.
Proposal:
Have request.error() -> Exception and request.has_error() -> bool to request and raise_exception parameter to request which would switch if the error should be raised or be accessible only through the methods.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Use case:
We use HttpX for testing and we would like to check if response returns error similar to how we check if the request was successful.status_code). That way we do not have to do two types of checks, assert for successful requests and try/catch for errors.
Proposal:
Have
request.error() -> Exception
andrequest.has_error() -> bool
to request andraise_exception
parameter torequest
which would switch if the error should be raised or be accessible only through the methods.Beta Was this translation helpful? Give feedback.
All reactions