hydrogen-web
hydrogen-web copied to clipboard
Improve error handling in the UI and logs
The following cases are handled:
- Error is shown in the UI when all the theme manifests failed to load (in addition to them being logged).
- If some manifests failed to load but at least one manifest is available, the errors are not shown in UI but all such errors are logged.
- If after parsing all the themes, no themes are available (for eg due to them all missing the "name" field) then an error saying as much is shown in the UI.
- If some themes failed to parse but at least one is available, no errors are shown in the UI although they are still logged.
- If when setting a particular theme, the css file added using the
link
element failed to load, an error is shown in the UI. This is limited to when the theme is set byPlatform.init
method.