[marketplace] Update CommunityUIWidgetAddonHandler.java to give a more helpful error (#4052)
Installing from marketplace gives an Error that is not very helpful. Couldn’t find the widget in the add-on entry The cause was missing ```yaml code fence when a normal code fence was used. This used to work in the past so a number of widgets are done this way and will not install. Suggest a more useful message to help guide widget devs. Signed-off-by: Matthew Skinner <matt@pcmus.com>pull/3930/head
parent
5c9f192764
commit
4905805ea8
|
@ -86,7 +86,8 @@ public class CommunityUIWidgetAddonHandler implements MarketplaceAddonHandler {
|
|||
} else if (yamlContent != null) {
|
||||
addWidgetAsYAML(addon.getUid(), yamlContent);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Couldn't find the widget in the add-on entry");
|
||||
throw new IllegalArgumentException(
|
||||
"Couldn't find the widget in the add-on entry. The starting code fence may not be marked as ```yaml");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
logger.error("Widget from marketplace cannot be downloaded: {}", e.getMessage());
|
||||
|
|
Loading…
Reference in New Issue