This commit is contained in:
ropresearch 2025-10-10 11:50:39 -04:00
parent baf4b2d8a8
commit e5b8fb8654
3 changed files with 37 additions and 90 deletions

View file

@ -773,14 +773,11 @@ class BaseEnv(ABC):
scored_data,
) as resp:
if resp.status >= 500:
# Server errors (5xx) should trigger a retry
logging.debug(f"Server error: {resp.status}, retrying...")
raise Exception(f"Server error: {resp.status}")
elif resp.status >= 400:
# Client errors (4xx) are logged but not retried
logging.error(f"Client error: {resp.status}, not retrying")
return
# Success case: print response text
print(await resp.text())
def _post_json_with_compression(