Struct RpcErrorInfo
Namespace: DotBoxD.Services.Diagnostics
Assembly: DotBoxD.Services.dll
The error returned to a remote caller for a handler exception, produced by
DotBoxD.Services.Peer.RpcPeerOptions.ExceptionTransformer on the side that runs the service.
DotBoxD.Services.Diagnostics.RpcErrorInfo.Message becomes the caller’s RemoteServiceException message and
DotBoxD.Services.Diagnostics.RpcErrorInfo.Type its remote error-type name (e.g. a value from DotBoxD.Services.Diagnostics.RpcErrorTypes or a
custom application error code).
public readonly record struct RpcErrorInfo : IEquatable<RpcErrorInfo>Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object), object.Equals(object, object), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object, object), object.ToString()
Constructors
Section titled “Constructors”RpcErrorInfo(string, string)
Section titled “ RpcErrorInfo(string, string)”The error returned to a remote caller for a handler exception, produced by
DotBoxD.Services.Peer.RpcPeerOptions.ExceptionTransformer on the side that runs the service.
DotBoxD.Services.Diagnostics.RpcErrorInfo.Message becomes the caller’s RemoteServiceException message and
DotBoxD.Services.Diagnostics.RpcErrorInfo.Type its remote error-type name (e.g. a value from DotBoxD.Services.Diagnostics.RpcErrorTypes or a
custom application error code).
public RpcErrorInfo(string Message, string Type)Parameters
Section titled “Parameters”Message string
Type string
Properties
Section titled “Properties”Message
Section titled “ Message”public string Message { get; init; }Property Value
Section titled “Property Value”public string Type { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”FromException(Exception)
Section titled “ FromException(Exception)”Builds an DotBoxD.Services.Diagnostics.RpcErrorInfo that exposes the exception’s message and runtime type
name — the “expose everything” shortcut for a transformer. Prefer a tailored transformer that
returns safe, caller-facing messages: exception text can carry sensitive detail (file paths,
connection strings), so only expose it to trusted peers.
public static RpcErrorInfo FromException(Exception exception)Parameters
Section titled “Parameters”exception Exception