Hey Sofian,
Is it possible to test this with a breakpoint?
Depending on the size of the list you're retreiving, this is what I would do: use my data source flow first as a subflow to return a boolean (isListEmpty) in a helper object and show an alternative message for users. If it's not empty, then I call the data source flow a second time to show the contents of the list.
Good luck with the error!
I encountered this same issue. In my case, it was related to an object that I retrieved from storage. When I tried to use this object in a combobox within a snippet and a template grid, Mendix threw this error. To solve the first case, it was only necessary to remove the snippet and use it directly on the page. For the second case, it was necessary to commit this non-persistent object.