public RpcException(Status status, Metadata trailers, string message)
Creates a newRpcExceptionassociated with given status, message and trailing response metadata.
NOTE: the exception message is not sent to the remote peer. Usestatus.Detailsto pass error
details to the peer.
public RpcException(Status status, string message)
Creates a newRpcExceptionassociated with given status and message.
NOTE: the exception message is not sent to the remote peer. Usestatus.Detailsto pass error
details to the peer.
Gets the call trailing metadata.
Trailers only have meaningful content for client-side calls (in which case they represent the trailing metadata sent by the server when closing the call).
Instances ofRpcExceptionthrown by the server-side part of the stack will have trailers always set to empty.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003e\u003ccode\u003eRpcException\u003c/code\u003e is thrown when a remote procedure call fails, and it is associated with a \u003ccode\u003eStatus\u003c/code\u003e that indicates the result of the call.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRpcException\u003c/code\u003e class offers four constructors for creation, which allow for setting the \u003ccode\u003eStatus\u003c/code\u003e, \u003ccode\u003eMetadata\u003c/code\u003e trailers, and/or a message.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eRpcException\u003c/code\u003e has three main properties: \u003ccode\u003eStatus\u003c/code\u003e (representing the call's result), \u003ccode\u003eStatusCode\u003c/code\u003e (providing the status code), and \u003ccode\u003eTrailers\u003c/code\u003e (containing the trailing metadata from the server in client-side calls).\u003c/p\u003e\n"],["\u003cp\u003eWhen creating an \u003ccode\u003eRpcException\u003c/code\u003e with a message, it is important to note that the message is not sent to the remote peer, and you must use \u003ccode\u003estatus.Details\u003c/code\u003e to share error details.\u003c/p\u003e\n"]]],[],null,[]]