Normalize 'already exists' errors

and fix some error messages where they were wrong or redundant

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
Daniel Nephin
2017-11-15 16:46:27 -05:00
parent a542cf7dac
commit 2e7f7318cc
4 changed files with 5 additions and 5 deletions

View File

@@ -105,7 +105,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", container.ID)
err = errors.Wrapf(errdefs.ErrAlreadyExists, "container %q", container.ID)
}
return containers.Container{}, err
}