forked from TrueCloudLab/frostfs-api-go
service: get status error even if it is wrapped
This commit is contained in:
parent
b6de95b740
commit
d08f5a5811
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nspcc-dev/neofs-proto/internal"
|
"github.com/nspcc-dev/neofs-proto/internal"
|
||||||
|
"github.com/pkg/errors"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
)
|
)
|
||||||
|
@ -101,7 +102,7 @@ func ProcessRequestTTL(req MetaHeader, cond ...TTLCondition) error {
|
||||||
|
|
||||||
// check specific condition:
|
// check specific condition:
|
||||||
if err := cond[i](ttl); err != nil {
|
if err := cond[i](ttl); err != nil {
|
||||||
if st, ok := status.FromError(err); ok {
|
if st, ok := status.FromError(errors.Cause(err)); ok {
|
||||||
return st.Err()
|
return st.Err()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue