bravado
bravado copied to clipboard
General timeout exception
I've seen some code that, in order to catch both fido and requests timeouts, look something like:
try:
result = future.result(timeout=SOME_TIMEOUT)
except (crochet.TimeoutError, requests.exceptions.Timeout):
# re-raise as some common thing
It would be nice if bravado handled this by making some general timeout exception that clients can catch.
@macisamuele #321 fixed this, right?
Yes, it does. Sorry for not have commented on this issue. Note: the PR does not handle connection timeouts (for those the exception is still dependent on the http client implementation)
@macisamuele No worries. I'll leave this issue open for the connection timeout addition. Thanks!