Azure / Azure/Azure-Functions

[ActivityTrigger] parameter named "data" causes error on local startup

Open
#1,281 15 comments 19 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

Here's the method:

[FunctionName(nameof(DoActivity))]
public static async Task DoActivity([ActivityTrigger]string data, ILogger log)
{
log.LogInformation($"hashing {data}");

return data.GetHashCode().ToString();
}

Here's the error that appears in the console window:

[7/20/2019 6:01:27 PM] Microsoft.Azure.WebJobs.Host: Error indexing method 'DoActivity'. Microsoft.Azure.WebJobs.Host: Can't bind parameter 'data' to type 'System.String'.
[7/20/2019 6:01:27 PM] Error indexing method 'DoActivity'
[7/20/2019 6:01:27 PM] Microsoft.Azure.WebJobs.Host: Error indexing method 'DoActivity'. Microsoft.Azure.WebJobs.Host: Can't bind parameter 'data' to type 'System.String'.

When parameter "data" is renamed to, say, "info" the error goes away.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.