Hi @notnotscott,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
As I understand it, the issue you're facing is likely due to the incorrect formatting of the partition key path.
In Azure Cosmos DB, the partition key path should be specified without any additional escape characters or quotes. When you use "/"id"", the extra quotes and escape characters cause the partition key path to be misinterpreted, leading to a Bad Request exception.
Here are a few key points to consider:
- The partition key path should be specified as "/id" without any additional quotes or escape characters. This ensures that the partition key is correctly recognized and used by Cosmos DB.
- Ensure that the partition key value in your documents matches the partition key path specified when creating the container. Any mismatch can lead to errors.
- A BadRequest (400) error can occur if the partition key value is of an invalid type, if the partition key path is incorrect, or if the partition key value does not match the expected value in the document.
For more information, please refer the document: https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/troubleshoot-bad-request
Hope this helps. Do let us know if you have any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.