Coverage for fingerprint_pro_server_api_sdk/extend_exception.py: 100%
8 statements
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-09 17:50 +0000
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-09 17:50 +0000
1from fingerprint_pro_server_api_sdk.rest import KnownApiException
4def extend_exception(exception, error_object):
5 if exception.status == 429:
6 try:
7 error_object.retry_after = int(exception.headers.get('retry-after'))
8 except Exception:
9 error_object.retry_after = 1
10 return KnownApiException(exception, error_object)