Catalog: Show install error with incompatible version (#65059)

This commit is contained in:
Andres Martinez Gotor authored and GitHub committed 2023-04-19 10:22:24 +02:00
1 parent bc5881a051
commit 98778289cb
8 files changed
+54 -13

No files matched your search

+4
View File
@@ -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)
}