refactor: use errors.Is
This commit is contained in:
parent
f4b981f97f
commit
a90344daf0
|
@ -228,7 +228,7 @@ func (s *StorageServiceImpl) createBucketIfNotExists(bucket string) error {
|
|||
}
|
||||
|
||||
if err != nil {
|
||||
if !strings.Contains(err.Error(), "bucket not found") {
|
||||
if !errors.Is(err, api.ErrBucketNotFound) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue