From d08f5a5811f0f19e7981bc3f60a391e7d722a261 Mon Sep 17 00:00:00 2001 From: Evgeniy Kulikov Date: Tue, 26 Nov 2019 14:08:52 +0300 Subject: [PATCH] service: get status error even if it is wrapped --- service/meta.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service/meta.go b/service/meta.go index abffdadd..c5d09f72 100644 --- a/service/meta.go +++ b/service/meta.go @@ -2,6 +2,7 @@ package service import ( "github.com/nspcc-dev/neofs-proto/internal" + "github.com/pkg/errors" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) @@ -101,7 +102,7 @@ func ProcessRequestTTL(req MetaHeader, cond ...TTLCondition) error { // check specific condition: 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() }