fix: improve error messages related to plugins

This commit is contained in:
Ludovic Fernandez 2023-06-02 11:34:06 +02:00 committed by GitHub
parent 6977b68b72
commit 9aa57f362b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 17 deletions

View file

@ -35,12 +35,12 @@ func initPlugins(staticCfg *static.Configuration) (*plugins.Client, map[string]p
var err error
client, err = plugins.NewClient(opts)
if err != nil {
return nil, nil, nil, err
return nil, nil, nil, fmt.Errorf("unable to create plugins client: %w", err)
}
err = plugins.SetupRemotePlugins(client, staticCfg.Experimental.Plugins)
if err != nil {
return nil, nil, nil, err
return nil, nil, nil, fmt.Errorf("unable to set up plugins environment: %w", err)
}
plgs = staticCfg.Experimental.Plugins