OData link response contains the data as well as an Error: 500

0
Hello, I created an OData link for my application that has 3 entities. When I try to import that data, I am getting a "Incorrect JSON format. There can only be one root" error for only one of the entities. When I tested the link using Postman, I found that the response contains the data in the value field and then an error: 500    ``` {     "error": {         "code": "500",         "message": "Exception occurred while processing OData request."     } } ``` How can I resolve this. What can be the possible errors?   Thanks in advance!
asked
1 answers
0

I have the same issue, vscode tells me what the issue is, just not how to solve it:

 

Power BI is Following Standards:

  • ✅ JSON RFC 7159: Requires exactly one root value
  • ✅ OData v4 Specification: Proper response format
  • ✅ Industry Standards: Any JSON parser would reject this

What Power BI Receives:

{"@odata.context":"...","value":[...]}{"error":{"code":"500","message":"..."}}

This is invalid JSON - it has two root objects. Power BI correctly rejects it.

Other Tools Would Fail Too:

  • ❌ Excel: Would have same JSON parsing error
  • ❌ Postman: Would show malformed JSON warning
  • ❌ Custom applications: Any JSON parser would fail
  • ❌ API testing tools: Would flag as invalid response

The Server Should Return:

Success Case:

 

 

{
  "@odata.context": "...",
  "value": [
    {
      "UUID": "...",
      "TotalEnds": 3730,
      "Event": {
        "UUID": "...",
        "EventName": "..."
      }
    }
  ]
}

Error Case:

 

 

{
  "error": {
    "code": "500",
    "message": "Exception occurred while processing OData request."
  }
}

NEVER Both:

The server is mixing success and error responses, which violates all standards.

Power BI's Response is Professional:

Power BI gives you a clear, accurate error message:

"Invalid JSON. More than one value was found at the root"

This is exactly what should happen when receiving malformed JSON.

Bottom Line: Power BI is doing its job correctly. The OData service needs to be fixed by whoever maintains it (likely your Mendix team or backend developers).

answered