When you create the data service usually it is created with streaming enable. When the streaming is enabled it will not construct the payload and just stream hence may occur this error. You can disable the streaming by unchecking the box in the Dataservice or defining and attribute in the data service.
disableStreaming=true