OdataV4 Error : An error has occurred.

kpacu
kpacu Member Posts: 1

Environment: Windows, Microsoft Dynamics NAV 2018

I am writing here because I spend few hours for fighting with this error and hope will help someone in the future.

In the Event log the error was registered as:

Type: System.ArgumentException

Message: <ii>An item with the same key has already been added.</ii>

The error appears if call Odata Link for published page, but also appears when calling info for metadata:

http://IP_address:Port/ServiceInstance/ODataV4/$metadata

After deep research with search engines and AI agent didn't found any solution for my case.

Finally, with help of more skilled my colleague we found that the problem is in table: OData Edm Type. After clearing it the problem was solved.