diff --git a/strix/core/execution.py b/strix/core/execution.py index ff60fee9..5997e3db 100644 --- a/strix/core/execution.py +++ b/strix/core/execution.py @@ -184,7 +184,7 @@ def _is_transient_model_error(exc: BaseException) -> bool: return True code = _model_error_status_code(exc) if code is not None: - return code >= 400 and code not in (401, 402, 403) + return code >= 400 and code not in (401, 402, 403, 404) return isinstance(exc, APIError) diff --git a/tests/test_execution_transient_retry.py b/tests/test_execution_transient_retry.py index 6b2fd336..f0276932 100644 --- a/tests/test_execution_transient_retry.py +++ b/tests/test_execution_transient_retry.py @@ -84,8 +84,7 @@ def test_client_errors_are_transient() -> None: "bad", response=httpx.Response(400, request=_request()), body=None ) assert execution._is_transient_model_error(bad_request) is True - assert execution._is_transient_model_error(_status_error(404)) is True - for status in (401, 402, 403): + for status in (401, 402, 403, 404): assert execution._is_transient_model_error(_status_error(status)) is False assert execution._is_transient_model_error(ValueError("nope")) is False