diff --git a/ogr/services/github/service.py b/ogr/services/github/service.py index b4452294..76d20a04 100644 --- a/ogr/services/github/service.py +++ b/ogr/services/github/service.py @@ -49,7 +49,7 @@ def __init__( github_app_private_key_path: Optional[str] = None, tokman_instance_url: Optional[str] = None, github_authentication: GithubAuthentication = None, - max_retries: Union[int, Retry] = 0, + max_retries: Union[int, Retry] = 1, **kwargs, ): """ @@ -69,12 +69,11 @@ def __init__( else: self._max_retries = Retry( total=int(max_retries), - read=0, # Retry mechanism active for these HTTP methods: allowed_methods=["DELETE", "GET", "PATCH", "POST", "PUT"], # Only retry on following HTTP status codes status_forcelist=[500, 503, 403, 401], - raise_on_status=False, + raise_on_status=True, ) if not self._default_auth_method: diff --git a/tests/unit/test_factory.py b/tests/unit/test_factory.py index 2de1e4c2..fa5583e1 100644 --- a/tests/unit/test_factory.py +++ b/tests/unit/test_factory.py @@ -465,7 +465,7 @@ def test_get_instances_from_dict_multiple_auth(instances_in_dict, result_instanc "token": "abcd", }, }, - 0, + 1, ), ( {