bravado icon indicating copy to clipboard operation
bravado copied to clipboard

General timeout exception

Open bplotnick opened this issue 8 years ago • 3 comments

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.

bplotnick avatar Apr 20 '17 23:04 bplotnick

@macisamuele #321 fixed this, right?

bplotnick avatar Jan 17 '18 02:01 bplotnick

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 avatar Jan 17 '18 08:01 macisamuele

@macisamuele No worries. I'll leave this issue open for the connection timeout addition. Thanks!

bplotnick avatar Jan 18 '18 00:01 bplotnick