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.

Open
#283 0 comments 0 reactions 0 assignees View on GitHub
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

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.