I have been following the exercise at this URL ...
https://learn.microsoft.com/en-us/learn/modules/chain-azure-functions-data-using-bindings/5-read-data-with-input-bindings-portal-lab?pivots=javascript
... and everything is OK until I get to the "Try it out" section at the end, at which point the function always returns "No bookmarks found", irrespective of what value I supply for the id parameter.
The logs for the Azure Function App all show the function executing successfully. However, the activity log on the CosmosDB side shows no activity, as if the database had not even been contacted.
Just to be clear, the code of the function (in index.js) is copied directly from the exercise instructions, and the function.json is as follows, (where jgfunctioniotestse is the name of my CosmosDB account). Also, the CosmosDB contains the five items indicated in the exercise (in database "func-io-learn-db", container "Bookmarks".
{
"bindings": [
{
"authLevel": "function",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [
"get",
"post"
]
},
{
"type": "http",
"direction": "out",
"name": "res"
},
{
"name": "bookmark",
"direction": "in",
"type": "cosmosDB",
"databaseName": "func-io-learn-db",
"collectionName": "Bookmarks",
"connectionStringSetting": "jgfunctioniotestse_DOCUMENTDB",
"id": "id",
"partitionKey": "/id"
}
]
}
This absence of error messages is making it hard to troubleshoot; can you suggest anywhere else I could look?