[MM-25607] Correctly log if plugin icon is invalid (#14679)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ac4c675a19
Коммит
81a87533a9
@@ -889,8 +889,10 @@ func getIcon(iconPath string) (string, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", errors.Wrapf(err, "failed to open icon at path %s", iconPath)
|
return "", errors.Wrapf(err, "failed to open icon at path %s", iconPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !svg.Is(icon) {
|
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
|
return fmt.Sprintf("data:image/svg+xml;base64,%s", base64.StdEncoding.EncodeToString(icon)), nil
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user