forked from TrueCloudLab/frostfs-api-go
service: ProcessRequestTTL shouldn't change status errors
This commit is contained in:
parent
28628d3b52
commit
5c031fc6b2
2 changed files with 23 additions and 12 deletions
|
@ -101,6 +101,10 @@ func ProcessRequestTTL(req MetaHeader, cond ...TTLCondition) error {
|
|||
|
||||
// check specific condition:
|
||||
if err := cond[i](ttl); err != nil {
|
||||
if st, ok := status.FromError(err); ok {
|
||||
return st.Err()
|
||||
}
|
||||
|
||||
return status.New(codes.InvalidArgument, err.Error()).Err()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue