From 47b110a59295a2713fb18114f3afed7e2421d5e2 Mon Sep 17 00:00:00 2001 From: zteBill Date: Tue, 22 Nov 2016 16:44:46 +0800 Subject: [PATCH] check err type Signed-off-by: zteBill --- volume/store/store.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/volume/store/store.go b/volume/store/store.go index 40ae6ad6f1..ff6505ff15 100644 --- a/volume/store/store.go +++ b/volume/store/store.go @@ -255,6 +255,9 @@ func (s *VolumeStore) CreateWithRef(name, driverName, ref string, opts, labels m v, err := s.create(name, driverName, opts, labels) if err != nil { + if _, ok := err.(*OpErr); ok { + return nil, err + } return nil, &OpErr{Err: err, Name: name, Op: "create"} }