mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-25607] Correctly log if plugin icon is invalid (#14679)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user