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
I have some retry logic that retries requests on certain HTTP status codes and on ureq::Error::Transport. I want to test my logic that determines if an error is retryable by feeding it synthetic ureq::Error values. I can easily create an instance of ureq::Error::Status since ureq::Response::new is public (as noted in the doccomment, it is indeed useful for unit tests), but there's no way for a client to create a ureq::Error::Transport value.
The text was updated successfully, but these errors were encountered:
It looks like that would let me construct the Transport variant of ureq::Error, which I think might suffice for the testing case I described. I'm afraid I've since deleted the tests in question, so I don't really remember. So unless you have someone else asking for this, or some other motivation to do it, feel free to close without action.
I have some retry logic that retries requests on certain HTTP status codes and on
ureq::Error::Transport
. I want to test my logic that determines if an error is retryable by feeding it syntheticureq::Error
values. I can easily create an instance ofureq::Error::Status
sinceureq::Response::new
is public (as noted in the doccomment, it is indeed useful for unit tests), but there's no way for a client to create aureq::Error::Transport
value.The text was updated successfully, but these errors were encountered: