getMFHoldings API call broken due to content-type error

dhrutikpatel
When calling the `getMFHoldings()` method from the Kite Connect SDK in the following endpoint:

```js
app.get("/api/v1/mutualfunds", ensureToken, async (req, res) => {
try {
const kc = getKiteClientWithToken();
const mfHoldings = await kc.getMFHoldings();
res.json(mfHoldings);
} catch (err) {
console.error("❌ Error fetching mutual funds:", JSON.stringify(err, null, 2));
res.status(500).send("Failed to fetch mutual funds");
}
});
```

the request results in the following error:

```
{"error_type":"DataException","message":"Unknown content type (application/json;charset=utf-8) with response: ([object Object])"}
```
Sign In or Register to comment.