Data source plugin: Improve error message when plugin has connection issues (#102625)
* Improve data source error message when stackID * Update comment * Revert "Update comment" This reverts commit48922bc552. * Revert "Improve data source error message when stackID" This reverts commit4bf0a2f7b7. * Make public messagic configurable based on context * Update, simplify * Update * Update getting stack * Update pkg/plugins/errors.go Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com> * Refactor test to test for when context has stack value * Remove duplicated test * Fix error checking logic --------- Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
This commit is contained in:
co-authored by
Andres Martinez Gotor
parent
ffb6fb59a3
commit
54a51bd3e3
@@ -173,7 +173,7 @@ func (c *ClientV2) QueryData(ctx context.Context, req *backend.QueryDataRequest)
|
||||
}
|
||||
|
||||
if status.Code(err) == codes.Unavailable {
|
||||
return nil, plugins.ErrPluginGrpcConnectionUnavailableBase.Errorf("%v", err)
|
||||
return nil, plugins.ErrPluginGrpcConnectionUnavailableBaseFn(ctx).Errorf("%v", err)
|
||||
}
|
||||
|
||||
if status.Code(err) == codes.ResourceExhausted {
|
||||
|
||||
Reference in New Issue
Block a user