[v9.5.x] Catalog: Show install error with incompatible version (#66817)
Catalog: Show install error with incompatible version (#65059)
(cherry picked from commit 98778289cb)
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
This commit is contained in:
co-authored by
Andres Martinez Gotor
parent
33ff08215c
commit
0315b911ef
@@ -469,6 +469,10 @@ func (hs *HTTPServer) InstallPlugin(c *contextmodel.ReqContext) response.Respons
|
||||
if errors.Is(err, plugins.ErrInstallCorePlugin) {
|
||||
return response.Error(http.StatusForbidden, "Cannot install or change a Core plugin", err)
|
||||
}
|
||||
var archError repo.ErrArcNotFound
|
||||
if errors.As(err, &archError) {
|
||||
return response.Error(http.StatusNotFound, archError.Error(), nil)
|
||||
}
|
||||
|
||||
return response.Error(http.StatusInternalServerError, "Failed to install plugin", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user