Have better errors for issues with KML files
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
I think there needs to be more helpful errors when a KML file fails to load. For example, I spent a long time trying to debug this error when adding a KML file to Cesium
Error processing drag and drop DemoKML.kml:RuntimeError: Invalid XMLHttpRequest response type.
Error
at new t (http://localhost:3000/lib/Cesium.js:517:29185)
at XMLHttpRequest.f.onload (http://localhost:3000/lib/Cesium.js:520:29246)
I tried with the unminified Cesium.js file, and it just pointed me to the place where the error was raised, not giving me any insight into what was wrong. I figured it was a problem with a link somewhere, since it was making an HTML request. Only after looking at it for a couple hours did I finally figure out the issue. I had my `styleUrl`s with spaces around it in my `Placemark`s
....
#RedLine
I feel like the Cesium file easily could have given me a much more descriptive error. Maybe not specifically where the error was happening, but at least there was an undefined style referenced
Contributor guide
Research direction
Start with the Cesium.js drag-and-drop KML loading path that produces the XMLHttpRequest error, using the provided KML example with a spaced styleUrl to reproduce it. Trace the failure far enough to determine what context is available, and consider the work complete when malformed or undefined styles produce an actionable error instead of only the generic response-type message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100