Azure / Azure/azure-functions-nodejs-library
Microsoft.Azure.WebJobs.Host: Unable to resolve the value for property 'SendGridAttribute.ApiKe y'. Make sure the setting exists and has a valid value.
- Dominant language
- TypeScript
- Stars
- 70
- Forks
- 35
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 6
Description
I am using azure/functions version 4.0.1. Which we recently updated from version 3.
So we removed the function.json and registered our functions like below:
```
import { processor } from "./processor";
import { app, output } from "@azure/functions";
const queueName = config.loadString("AZURE_SERVICEBUS_EMAIL_QUEUE_NAME");
const sendGridApiKey = config.loadString("SENDGRID_API_KEY");
app.serviceBusQueue("EmailSendingFunction", {
connection: "AZURE_SERVICEBUS_CONNECTION_STRING",
queueName,
handler: processor,
return: output.generic({
type: "sendGrid",
apiKey: sendGridApiKey,
}),
});
export default processor;
```
But we get an error:
```
System.Private.CoreLib: Exception while executing function: Functions.EmailSendingFunction. Microsoft.Azure.WebJobs.Host: Unable to resolve the value for property 'SendGridAttribute.ApiKe
y'. Make sure the setting exists and has a valid value.
```
Please provide a resolution as there is no documentation on how the sendGrid output binding works in v4.
Contributor guide
Assessment
This issue has not been assessed yet.