.NET API
SafeErrorText
Tracon.Abstractions.dllProduces text that is safe to write to a persistent field or an external response, from an exception that may carry provider, network, or third-party detail.
public static class SafeErrorTextInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”A TraconException is ours: its message is part of the
contract (TraconException.ErrorType is a stable code), and is
preserved as is. Any other exception’s message is never written to a
persistent field or an external response — a foreign message can carry a
request detail, an internal URL, a host:port, or a partial credential
that the exception’s own producer (a provider SDK, a webhook target, an OAuth
endpoint) put there without Tracon’s control. The safe text carries only
the exception’s type name and a correlation id.
The full exception (exception.ToString, inner chain included) still
goes to ILogger at the call site, tagged with the same correlation id
SafeErrorText.NewCorrelationId produced, so an operator can find it.
OperationCanceledException is not this method’s concern — every
call site already filters it out before reaching here.
Methods
Section titled “Methods”ForPersistence(Exception, string)
Section titled “ ForPersistence(Exception, string)”Produces text that is safe to write to a persistent field or an external response.
public static string ForPersistence(Exception exception, string correlationId)Parameters
Section titled “Parameters”exception Exception
The caught exception. Never null.
correlationId string
The id also written to the log entry that carries this exception’s full detail, from SafeErrorText.NewCorrelationId.
Returns
Section titled “Returns”NewCorrelationId()
Section titled “ NewCorrelationId()”Produces a new correlation id to tag a log entry and the safe text derived from it.
public static string NewCorrelationId()