[MM-25607] Correctly log if plugin icon is invalid (#14679)

This commit is contained in:
Ben Schumacher
2020-06-13 09:51:45 +02:00
committed by GitHub
parent ac4c675a19
commit 81a87533a9

View File

@@ -889,8 +889,10 @@ func getIcon(iconPath string) (string, error) {
if err != nil {
return "", errors.Wrapf(err, "failed to open icon at path %s", iconPath)
}
if !svg.Is(icon) {
return "", errors.Wrapf(err, "icon is not svg %s", iconPath)
return "", errors.Errorf("icon is not svg %s", iconPath)
}
return fmt.Sprintf("data:image/svg+xml;base64,%s", base64.StdEncoding.EncodeToString(icon)), nil
}