Azure / Azure/azure-functions-host

Improve warning message when there is mismatch in binding direction

Open
#908 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

Warning/Error message is misleading when there is mismatch in binding direction

#### Repro steps

1. Create any function in c#

2. Add OutputBinding NotificationHub

using System;

public static void Run(string myQueueItem, TraceWriter log, string notification)
{
log.Info($"C# Queue trigger function processed: {myQueueItem}");
}

Note: Did not specify **out** for notification parameter

#### Expected behavior

Error message indicating mismatch in direction

#### Actual behavior

Error indexing method 'Functions.QueueTriggerCSharp1'. Microsoft.Azure.WebJobs.Host: Can't bind NotificationHub to type 'System.String'.
Also,
Missing out for DocumentDB output binding shows following warning indicating there is a mismatch in argument name:
**Missing binding argument named 'outputDocument1'. Mismatched binding argument names may lead to function indexing errors.**

* Programming language used : C#
* Links to source

Contributor guide

Open the contributing guide

Research direction

No source file or test is named in the issue. Reproduce the C# function indexing cases for the NotificationHub and DocumentDB output bindings, then trace the binding-direction and argument-name warnings; done means the error identifies the direction mismatch rather than reporting only a type or argument-name mismatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.