Skip to content

Commit

Permalink
Catch RequestError in HTTPx requests
Browse files Browse the repository at this point in the history
- Improves stability
  • Loading branch information
pehala committed Nov 29, 2023
1 parent 024bbb1 commit cc2a966
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testsuite/httpx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Union

import backoff
from httpx import Client, ConnectError
from httpx import Client, RequestError

from testsuite.certificates import Certificate

Expand Down Expand Up @@ -127,7 +127,7 @@ def request(
extensions=extensions,
)
return Result(self.retry_codes, response=response)
except ConnectError as e:
except RequestError as e:
return Result(self.retry_codes, error=e)

def get(self, *args, **kwargs) -> Result:
Expand Down

0 comments on commit cc2a966

Please sign in to comment.