Error connecting Azure Function with CosmosDB

OLADOJA NIYI SAMAD 20 Reputation points
2023-06-07T15:28:27.4966667+00:00

I'm trying to output a document to Azure CosmosDB for Table with Azure function Http Trigger. I followed the sample from the documentation but I ran into error after running the sample code

Executed 'Functions.HttpTrigger1' (Failed, Id=60ea69c6-ba44-431d-ad26-f3d385dc008b, Duration=344ms) [2023-06-07T15:16:50.349Z] System.Private.CoreLib: Exception while executing function: Functions.HttpTrigger1. Microsoft.Azure.DocumentDB.Core: Value cannot be null. (Parameter 'serviceEndpoint').

Here is my local.settings.json

{

  "IsEncrypted": false,

  "Values": {

    "AzureWebJobsStorage": "",

    "FUNCTIONS_WORKER_RUNTIME": "python",

    "AzureCosmosDBConnectionString": "AZURE PRIMARY CONNECTION STRING"

  }

}
Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

Azure Cosmos DB
Azure Cosmos DB

An Azure NoSQL database service for app development.

0 comments No comments

1 answer

Sort by: Oldest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.