Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def wrapper(*args, **kwargs):
try:
return fn(*args, **kwargs)
except requests.exceptions.Timeout:
raise ConnectionTimeout()
except requests.exceptions.ConnectionError:
raise ConnectionError()
return wrapper