Skip to content

Commit

Permalink
Merge pull request #41215 from cpuguy83/better_plugin_errors
Browse files Browse the repository at this point in the history
Add more error details on plugin get
  • Loading branch information
AkihiroSuda committed Oct 24, 2021
2 parents bb6fdac + b1a3fe4 commit 4283e93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/plugins/plugins.go
Expand Up @@ -24,6 +24,7 @@ package plugins // import "github.com/docker/docker/pkg/plugins"

import (
"errors"
"fmt"
"sync"
"time"

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 4283e93

Please sign in to comment.