check err type
Signed-off-by: zteBill <bi.zhenkun@zte.com.cn>
This commit is contained in:
parent
5afdacb20e
commit
47b110a592
1 changed files with 3 additions and 0 deletions
|
@ -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"}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue