diff --git a/azure_functions_worker/functions.py b/azure_functions_worker/functions.py index 292fe485..b8302544 100644 --- a/azure_functions_worker/functions.py +++ b/azure_functions_worker/functions.py @@ -136,14 +136,14 @@ def validate_function_params(params: dict, bound_params: dict, if set(params) - set(bound_params): raise FunctionLoadError( func_name, - 'the following parameters are declared in Python but ' - f'not in function.json: {set(params) - set(bound_params)!r}') + 'the following parameters are declared in function parameter but ' + f'not in trigger annotation: {set(params) - set(bound_params)}') if set(bound_params) - set(params): raise FunctionLoadError( func_name, - f'the following parameters are declared in function.json but ' - f'not in Python: {set(bound_params) - set(params)!r}') + f'the following parameters are declared in trigger annotation but ' + f'not in faction parameter: {set(bound_params) - set(params)}') input_types: typing.Dict[str, ParamTypeInfo] = {} output_types: typing.Dict[str, ParamTypeInfo] = {} diff --git a/tests/unittests/test_broken_functions.py b/tests/unittests/test_broken_functions.py index 508122c9..16f87d48 100644 --- a/tests/unittests/test_broken_functions.py +++ b/tests/unittests/test_broken_functions.py @@ -21,7 +21,7 @@ async def test_load_broken__missing_py_param(self): self.assertRegex( r.response.result.exception.message, r".*cannot load the missing_py_param function" - r".*parameters are declared in function.json" + r".*parameters are declared in trigger annotation" r".*'req'.*") async def test_load_broken__missing_json_param(self): @@ -37,7 +37,7 @@ async def test_load_broken__missing_json_param(self): self.assertRegex( r.response.result.exception.message, r".*cannot load the missing_json_param function" - r".*parameters are declared in Python" + r".*parameters are declared in function parameter" r".*'spam'.*") async def test_load_broken__wrong_param_dir(self):