{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/46","repository_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/46/comments","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/46/events","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/issues/46","id":138290986,"number":46,"title":"C# runtime can break based on parameter name","user":{"login":"davidebbo","id":556238,"avatar_url":"https://avatars.githubusercontent.com/u/556238?v=3","gravatar_id":"","url":"https://api.github.com/users/davidebbo","html_url":"https://github.com/davidebbo","followers_url":"https://api.github.com/users/davidebbo/followers","following_url":"https://api.github.com/users/davidebbo/following{/other_user}","gists_url":"https://api.github.com/users/davidebbo/gists{/gist_id}","starred_url":"https://api.github.com/users/davidebbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidebbo/subscriptions","organizations_url":"https://api.github.com/users/davidebbo/orgs","repos_url":"https://api.github.com/users/davidebbo/repos","events_url":"https://api.github.com/users/davidebbo/events{/privacy}","received_events_url":"https://api.github.com/users/davidebbo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"fabiocav","id":2507935,"avatar_url":"https://avatars.githubusercontent.com/u/2507935?v=3","gravatar_id":"","url":"https://api.github.com/users/fabiocav","html_url":"https://github.com/fabiocav","followers_url":"https://api.github.com/users/fabiocav/followers","following_url":"https://api.github.com/users/fabiocav/following{/other_user}","gists_url":"https://api.github.com/users/fabiocav/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiocav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiocav/subscriptions","organizations_url":"https://api.github.com/users/fabiocav/orgs","repos_url":"https://api.github.com/users/fabiocav/repos","events_url":"https://api.github.com/users/fabiocav/events{/privacy}","received_events_url":"https://api.github.com/users/fabiocav/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-03-03T20:39:34Z","updated_at":"2016-03-03T20:45:56Z","closed_at":null,"body":"The following function runs fine:\r\n\r\n```\r\nusing System;\r\nusing System.Net;\r\nusing System.Net.Http;\r\nusing System.Threading.Tasks;\r\nusing Microsoft.Azure.WebJobs.Host;\r\n\r\npublic static Task<HttpResponseMessage> Run(HttpRequestMessage input, TraceWriter log)\r\n{\r\n    HttpResponseMessage res = new HttpResponseMessage(HttpStatusCode.OK)\r\n    {\r\n        Content = new StringContent(\"Please pass a name on the query string\")\r\n    };\r\n\r\n    return Task.FromResult(res);\r\n}\r\n```\r\n\r\nNow replace `HttpRequestMessage input` with `HttpRequestMessage req`, and it blows up at runtime with a generic 500 error.\r\n\r\nSo really two issues:\r\n\r\n1. Why does the parameter name matter?\r\n2. Can we improve error handling?"},"comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/comments/191955263","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/issues/46#issuecomment-191955263","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/46","id":191955263,"user":{"login":"mathewc","id":1056548,"avatar_url":"https://avatars.githubusercontent.com/u/1056548?v=3","gravatar_id":"","url":"https://api.github.com/users/mathewc","html_url":"https://github.com/mathewc","followers_url":"https://api.github.com/users/mathewc/followers","following_url":"https://api.github.com/users/mathewc/following{/other_user}","gists_url":"https://api.github.com/users/mathewc/gists{/gist_id}","starred_url":"https://api.github.com/users/mathewc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathewc/subscriptions","organizations_url":"https://api.github.com/users/mathewc/orgs","repos_url":"https://api.github.com/users/mathewc/repos","events_url":"https://api.github.com/users/mathewc/events{/privacy}","received_events_url":"https://api.github.com/users/mathewc/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T20:45:56Z","updated_at":"2016-03-03T20:45:56Z","body":"Yes, currently he's matching parameters in metadata to those in code via name. Only an issue for C#. When you don't explicitly name your param in function.json it defaults to 'input'. If you added name: 'req' to your binding it would work.\r\n\r\nThis is just a loose end. C# parameter matching should probably be positional. For all other language types other than C# it makes sense to specify names in config, but for C# the names come from the code. I had this on my list to go look into / fix after the C# review."}}