Hi, I’m working on a chat bot in Microsoft Bot Framework Composer and want to use MongoDB to store user answers.
However, when trying to insert/ update data in my database, I get the following response:
{
“lgType”: “Activity”,
“text”: { “statusCode”: 400, “reasonPhrase”: “Bad Request”, “headers”: { “Strict-Transport-Security”: “max-age=31536000; includeSubdomains;”, “Vary”: “Origin”, “x-appservices-request-id”: “64c63883f4484c181bdcf96d”, “X-Frame-Options”: “DENY”, “Date”: “Sun, 30 Jul 2023 10:16:35 GMT”, “x-envoy-upstream-service-time”: “31”, “Server”: “mdbws”, “x-envoy-decorator-operation”: “baas-main.baas-prod.svc.cluster.local:8086/*” },
“content”: “Header missing: please add content-type: application/json or application/ejson to specify payload data types” }
}
Even though I already have a content-type header:
(and “upsert”: true)
Notice that application/json is configured once under “Headers” and as well as unser “Content type” below. I’ve tried various combinations of both headers, but changing the key to “content-type” or deleting it has no impact on the Bad Request response. The same applies to insertOne and other actions that add data.
Additionally, action/find works totally fine with the same key and base URL (in this case, I only use the “Content type” below, not the additional one under “api-key”).
In the Data API logs, the updateOne request is displayed with Status: OK.
Has someone experience with using Atlas Data API in Composer?
Any idea what the problem could be would help me a lot. Thanks!