Skip to content

Function v2 has misleading error messages #1716

@Kisbogyi

Description

@Kisbogyi

Expected Behavior

@bp_healthcheck.timer_trigger(
    schedule="0 */30 * * * *", arg_name="myTimer"
)
async def healthcheck() -> None:

Here the error message should be something like:
"the following parameters are declared in function parameter but not in trigger annotation: myTimer"

Actual Behavior

When somebody created a trigger with wrong parameters the error said: "FunctionLoadError: cannot load the healthcheck function: the following parameters are declared in function.json but not in Python: {'myTimer'}" but with python function v2 functin.json is not utilized.

Examle code snippet to reproduce issue:

@bp_healthcheck.timer_trigger(
    schedule="0 */30 * * * *", arg_name="myTimer"
)
async def healthcheck() -> None:

Steps to Reproduce

Create this time trigger in a python v2 azure function

@bp_healthcheck.timer_trigger(
    schedule="0 */30 * * * *", arg_name="myTimer"
)
async def healthcheck() -> None:

Relevant code being tried

Relevant log output

requirements.txt file

Where are you facing this problem?

Local - Core Tools

Function app name

No response

Additional Information

#1700 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions