forked from TrueCloudLab/frostfs-sdk-go
[#307] status: Support EACL_NOT_FOUND status code
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
a0f7c903d3
commit
7a99cc916c
6 changed files with 67 additions and 1 deletions
|
@ -28,6 +28,19 @@ func IsErrContainerNotFound(err error) bool {
|
|||
}
|
||||
}
|
||||
|
||||
// IsErrEACLNotFound checks if err corresponds to NeoFS status
|
||||
// return corresponding to missing eACL table. Supports wrapped errors.
|
||||
func IsErrEACLNotFound(err error) bool {
|
||||
switch unwrapErr(err).(type) {
|
||||
default:
|
||||
return false
|
||||
case
|
||||
apistatus.EACLNotFound,
|
||||
*apistatus.EACLNotFound:
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
// IsErrObjectNotFound checks if err corresponds to NeoFS status
|
||||
// return corresponding to missing object. Supports wrapped errors.
|
||||
func IsErrObjectNotFound(err error) bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue