diff --git a/src/prefect/exceptions.py b/src/prefect/exceptions.py index 30b15b311c84..12354176c757 100644 --- a/src/prefect/exceptions.py +++ b/src/prefect/exceptions.py @@ -194,7 +194,7 @@ def from_bind_failure( base = f"Error binding parameters for function '{fn.__name__}': {exc}" signature = f"Function '{fn.__name__}' has signature '{fn_signature}'" - received = f"received args: {call_args} and kwargs: {call_kwargs}" + received = f"received args: {call_args} and kwargs: {list(call_kwargs.keys())}" msg = f"{base}.\n{signature} but {received}." return cls(msg) diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py index 6045fb86fe3d..237150991b7b 100644 --- a/tests/test_exceptions.py +++ b/tests/test_exceptions.py @@ -79,8 +79,8 @@ def fn(a: int, b: str): type_error = TypeError("Demo TypeError") expected_str = ( "Error binding parameters for function 'fn': Demo TypeError.\nFunction 'fn'" - " has signature 'a: int, b: str' but received args: () and kwargs: {'c': 3," - " 'd': 'test'}." + " has signature 'a: int, b: str' but received args: () and kwargs: ['c'," + " 'd']." ) pbe = ParameterBindError.from_bind_failure( fn, type_error, (), {"c": 3, "d": "test"}