Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.Azure.WebJobs.Host: Unable to resolve the value for property 'SendGridAttribute.ApiKe y'. Make sure the setting exists and has a valid value. #283

Open
Sanketbhangale opened this issue Jul 26, 2024 · 0 comments

Comments

@Sanketbhangale
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant