mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add more error details on plugin get
Seeing this `ErrNotImplements` in some of our logs and it's not very helpful because we don't know what plugin is causing it or even what the requested interface is. ``` {"message":"legacy plugin: Plugin does not implement the requested driver"} ``` Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
60c45c332f
commit
b1a3fe4934
1 changed files with 2 additions and 1 deletions
|
@ -24,6 +24,7 @@ package plugins // import "github.com/docker/docker/pkg/plugins"
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
@ -265,7 +266,7 @@ func Get(name, imp string) (*Plugin, error) {
|
|||
logrus.Debugf("%s implements: %s", name, imp)
|
||||
return pl, nil
|
||||
}
|
||||
return nil, ErrNotImplements
|
||||
return nil, fmt.Errorf("%w: plugin=%q, requested implementation=%q", ErrNotImplements, name, imp)
|
||||
}
|
||||
|
||||
// Handle adds the specified function to the extpointHandlers.
|
||||
|
|
Loading…
Add table
Reference in a new issue