mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Return plugin error when requesting settings (#86052)
This commit is contained in:
committed by
GitHub
parent
8373fc3544
commit
eac02a61e1
@@ -173,6 +173,11 @@ func (hs *HTTPServer) GetPluginList(c *contextmodel.ReqContext) response.Respons
|
||||
func (hs *HTTPServer) GetPluginSettingByID(c *contextmodel.ReqContext) response.Response {
|
||||
pluginID := web.Params(c.Req)[":pluginId"]
|
||||
|
||||
perr := hs.pluginErrorResolver.PluginError(c.Req.Context(), pluginID)
|
||||
if perr != nil {
|
||||
return response.Error(http.StatusInternalServerError, perr.PublicMessage(), perr)
|
||||
}
|
||||
|
||||
plugin, exists := hs.pluginStore.Plugin(c.Req.Context(), pluginID)
|
||||
if !exists {
|
||||
return response.Error(http.StatusNotFound, "Plugin not found, no installed plugin with that id", nil)
|
||||
|
||||
Reference in New Issue
Block a user