You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a gRPC service.
I try validate data I receive and reply with an error like this:
publicoverrideTask<IntroduceYourselfReply>IntroduceYourself(IntroduceYourselfRequestrequest,ServerCallContextcontext){if(string.IsNullOrEmpty(request.Name)){context.ResponseTrailers.Add(newMetadata.Entry("Name","the value was empty"));context.Status=newStatus(StatusCode.InvalidArgument,$"Validation failed");returnTask.FromResult(newIntroduceYourselfReply());}returnTask.FromResult(newIntroduceYourselfReply{Name=request.Name,Job="Developer",Country="Canada",Citizenship={newstring[]{"France","Canada"}},Skills={newSkill[]{newSkill{SkillName=".NET",SkillLevel=SkillLevel.Good},newSkill{SkillName="CSS",SkillLevel=SkillLevel.Bad}}}});}
context.ResponseTrailers is supposed to be filled, but clientSide the property trailers is empty.
Filling the status works fine by the way.
Is this a bug or I'am using ResponseTrailers not correctly?
The text was updated successfully, but these errors were encountered:
I'm building a gRPC service.
I try validate data I receive and reply with an error like this:
context.ResponseTrailers is supposed to be filled, but clientSide the property trailers is empty.
Filling the status works fine by the way.
Is this a bug or I'am using ResponseTrailers not correctly?
The text was updated successfully, but these errors were encountered: