Environment:
PowerShell (Windows or Linux)
HTTP Trigger
When using function bindings similar to examples documented:
Example Binding Config:
"name": "myDocument",
"id": "{Query.id}",
"partitionKey": "{Query.tenantid}",
When the document is not found in CosmosDB:
In 3.x within the PowerShell function we get a 404 on the Document Lookup, but control is handed to the PowerShell function which gives us the ability to if($myDocument){#Do Something#}
With 4.x we still see the 404 error on the Document Lookup but the Microsoft.Azure.Cosmos.Client now throws and error. The function is not allowed to run and we receive a 500 Internal Server Error. Since the PowerShell function never runs, we don't have the ability to do an existence test.
To solve for this, I have had to use the "sqlQuery" binding option.
If this is the expected behavior, it would be worth mentioning on this page and update the examples on the input binding page.
With the same code, I tested various 4.x versions of the extensions bundle including the latest (4.7). All exhibit the same behavior. As soon as I revert back to 3.x (and changed the associated binding names). It works as expected.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
ID: 85e586ec-9cc0-d6b2-d64a-085dcb1b32c2
Version Independent ID: 032d523f-4af0-b219-7f14-425f8ef131e2
Environment: PowerShell (Windows or Linux) HTTP Trigger
When using function bindings similar to examples documented:
Example Binding Config: "name": "myDocument", "id": "{Query.id}", "partitionKey": "{Query.tenantid}",
When the document is not found in CosmosDB:
In 3.x within the PowerShell function we get a 404 on the Document Lookup, but control is handed to the PowerShell function which gives us the ability to if($myDocument){#Do Something#}
With 4.x we still see the 404 error on the Document Lookup but the Microsoft.Azure.Cosmos.Client now throws and error. The function is not allowed to run and we receive a 500 Internal Server Error. Since the PowerShell function never runs, we don't have the ability to do an existence test.
To solve for this, I have had to use the "sqlQuery" binding option.
If this is the expected behavior, it would be worth mentioning on this page and update the examples on the input binding page.
With the same code, I tested various 4.x versions of the extensions bundle including the latest (4.7). All exhibit the same behavior. As soon as I revert back to 3.x (and changed the associated binding names). It works as expected.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.