Azure / Azure/azure-functions-host

Binding name / parameter name conflicts causing binding failures

Open
#701 4 comments 0 reactions 1 assignee Claimed by @brettsam View on GitHub
bug
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

I'm trying to use table input binding using 'Id' property from HTTP request object.
Unfortunately, after executing function I get this error:

```
Microsoft.Azure.WebJobs.Host: Exception binding parameter 'task'. Microsoft.Azure.WebJobs.Host: No value for named parameter 'Id'.
```

```
public static TaskInfo Run(TaskId id, TaskDetails task, TraceWriter log)
{
return new TaskInfo {
Id = task.Id,
Status = task.Status,
ResultUri = task.ResultUri
};
}

public class TaskId
{
public string Id { get; set; }
}
```

function.json

```
{
"bindings": [
{
"authLevel": "anonymous",
"name": "id",
"type": "httpTrigger",
"direction": "in"
},
{
"name": "res",
"type": "http",
"direction": "out"
},
{
"type": "table",
"name": "task",
"tableName": "taskdetails",
"partitionKey": "{Id}",
"rowKey": "{Id}",
"direction": "in"
}
],
"disabled": false
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.