Merge pull request #1142 from ijc/error-formatting

Adding missing arguments to Wrapf
This commit is contained in:
Stephen Day 2017-07-07 11:09:07 -07:00 committed by GitHub
commit b9fb2793a8
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ func (s *containerStore) Get(ctx context.Context, id string) (containers.Contain
bkt := getContainerBucket(s.tx, namespace, id)
if bkt == nil {
return containers.Container{}, errors.Wrapf(errdefs.ErrNotFound, "bucket name %q")
return containers.Container{}, errors.Wrapf(errdefs.ErrNotFound, "bucket name %q:%q", namespace, id)
}
container := containers.Container{ID: id}
@ -144,7 +144,7 @@ func (s *containerStore) Create(ctx context.Context, container containers.Contai
cbkt, err := bkt.CreateBucket([]byte(container.ID))
if err != nil {
if err == bolt.ErrBucketExists {
err = errors.Wrapf(errdefs.ErrAlreadyExists, "content %q")
err = errors.Wrapf(errdefs.ErrAlreadyExists, "content %q", container.ID)
}
return containers.Container{}, err
}

View File

@ -32,7 +32,7 @@ func (s *namespaceStore) Create(ctx context.Context, namespace string, labels ma
bkt, err := topbkt.CreateBucket([]byte(namespace))
if err != nil {
if err == bolt.ErrBucketExists {
return errors.Wrapf(errdefs.ErrAlreadyExists, "namespace %q")
return errors.Wrapf(errdefs.ErrAlreadyExists, "namespace %q", namespace)
}
return err