mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 08:52:07 +08:00
Chore: Remove plugincontext.ErrPluginNotFound (#74997)
This commit is contained in:

committed by
GitHub

parent
1714fa598c
commit
ece94b1e01
@ -26,7 +26,6 @@ import (
|
||||
"github.com/grafana/grafana/pkg/services/datasources"
|
||||
"github.com/grafana/grafana/pkg/services/org"
|
||||
"github.com/grafana/grafana/pkg/services/pluginsintegration/pluginaccesscontrol"
|
||||
"github.com/grafana/grafana/pkg/services/pluginsintegration/plugincontext"
|
||||
"github.com/grafana/grafana/pkg/services/pluginsintegration/pluginsettings"
|
||||
"github.com/grafana/grafana/pkg/services/pluginsintegration/pluginstore"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
@ -394,10 +393,7 @@ func (hs *HTTPServer) CheckHealth(c *contextmodel.ReqContext) response.Response
|
||||
pluginID := web.Params(c.Req)[":pluginId"]
|
||||
pCtx, err := hs.pluginContextProvider.Get(c.Req.Context(), pluginID, c.SignedInUser, c.OrgID)
|
||||
if err != nil {
|
||||
if errors.Is(err, plugincontext.ErrPluginNotFound) {
|
||||
return response.Error(http.StatusNotFound, "Plugin not found", nil)
|
||||
}
|
||||
return response.Error(http.StatusInternalServerError, "Failed to get plugin settings", err)
|
||||
return response.ErrOrFallback(http.StatusInternalServerError, "Failed to get plugin settings", err)
|
||||
}
|
||||
resp, err := hs.pluginClient.CheckHealth(c.Req.Context(), &backend.CheckHealthRequest{
|
||||
PluginContext: pCtx,
|
||||
|
Reference in New Issue
Block a user