mirror of
https://github.com/peridotbuild/peridot.git
synced 2024-12-03 18:16:25 +00:00
Add additional NotFound error check for S3/Exists
This commit is contained in:
parent
8599fba8d9
commit
b4cf14131e
@ -25,6 +25,7 @@ import (
|
||||
"go.resf.org/peridot/base/go/storage"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// S3 is an implementation of the Storage interface for S3.
|
||||
@ -161,6 +162,9 @@ func (s *S3) Exists(object string) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
if strings.Contains(err.Error(), "NotFound") {
|
||||
return false, nil
|
||||
}
|
||||
return false, err
|
||||
}
|
||||
return true, nil
|
||||
|
Loading…
Reference in New Issue
Block a user