Catalog: Show install error with incompatible version (#65059)
This commit is contained in:
@@ -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