Skip to content

Commit c8197f9

Browse files
authored
Propagate catch_http_errors to TaskDatasetClient (#289)
1 parent 6a1555e commit c8197f9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/aviary/env_client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,12 @@ def __init__(
170170
# Note that None means no timeout, which is not a good default
171171
request_timeout: float | None = 300.0,
172172
api_key: str | None = None,
173+
catch_http_errors: bool = False,
173174
):
174175
self.server_url = server_url
175176
self.request_timeout = request_timeout
176177
self.api_key = api_key
178+
self.catch_http_errors = catch_http_errors
177179

178180
with self._get_http_client(httpx.Client) as http_client:
179181
response = http_client.get("/info")
@@ -203,6 +205,7 @@ def _make_env_client(self, idx: int | None) -> TaskEnvironmentClient:
203205
base_url=self.server_url,
204206
request_timeout=self.request_timeout,
205207
api_key=self.api_key,
208+
catch_http_errors=self.catch_http_errors,
206209
)
207210

208211
def __len__(self) -> int:

0 commit comments

Comments
 (0)