diff --git a/src/prefect/states.py b/src/prefect/states.py index e784b09704e5..dc71c9b90222 100644 --- a/src/prefect/states.py +++ b/src/prefect/states.py @@ -131,7 +131,7 @@ def format_exception(exc: BaseException, tb: TracebackType = None) -> str: async def exception_to_crashed_state( - exc: Union[BaseException | BaseExceptionGroup], + exc: Union[BaseException, BaseExceptionGroup], result_factory: Optional[ResultFactory] = None, ) -> State: """