diff --git a/pkg/util/merr/utils.go b/pkg/util/merr/utils.go index 75d4b762f5..74250fc1f8 100644 --- a/pkg/util/merr/utils.go +++ b/pkg/util/merr/utils.go @@ -118,7 +118,7 @@ func oldCode(code int32) commonpb.ErrorCode { } func Ok(status *commonpb.Status) bool { - return status.ErrorCode == commonpb.ErrorCode_Success && status.Code == 0 + return status.GetErrorCode() == commonpb.ErrorCode_Success && status.GetCode() == 0 } // Error returns a error according to the given status,