We are having some issues with KML downloads on our Hub/Open Data site. We noticed a few layer where users can download shapefiles and csv, but if they try KML they get "an error has occurred".
The same data can be downloaded as KML on the ESRI hub site
The layers in question include those hosted on our servers and those on ArcGIS Online.
I did not see any errors in the server logs on the layers we host
We had the same issue and our AGO Admin traced it back to the "Local Projections" option for the specific open data site. Seems there is a bug wherein having this option "enabled" causes hosted features to fail while exporting KML. The error shows that the coordinates get converted to local, but still populate LAT/LON fields in the KML. For us in Michigan using Michigan GeoRef, that means the integer values are "out of range". We have "disabled" this option to get our user base back up and running and pushed a ticket to ESRI to hopefully get it fixed.