Skip to content

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

Description

@Sanketbhangale

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions