Q1) How do I handle errors in this … worker, I presume? It seems to be running and if approximateTerrainHeights.json fails, which can happen outside the application’s control, does the whole Cesium application just … stop rendering with the orange error box?
Q2) Is there no way to retry ? The internal implementation of initialize() seems to remember the promise, and if it rejected, there is nothing you can do to retry.
For debugging, I usually check the “Disable cache” option in DevTools, which will do a full re-load of all assets when you refresh the page.
For your app, have you considered loading the file manually before launching the app? This way, you can directly handle any errors from the HTTP request. Then when the app launches, the file will already be in your browser’s cache.
Let us know if you have an idea for how to make this more robust in the main code.