IFluidErrorBase Interface
All normalized errors flowing through the Fluid Framework adhere to this readonly interface. It features errorType and errorInstanceId on top of Error's members as readonly, and a getter/setter for telemetry props to be included when the error is logged.
Signature
export interface IFluidErrorBase extends Error
Extends: Error
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
addTelemetryProperties | (props: ITelemetryProperties) => void | Add telemetry properties to this error which will be logged with the error | |
errorInstanceId | string | A Guid identifying this error instance. Useful in telemetry for deduping multiple logging events arising from the same error, or correlating an error with an inner error that caused it, in case of error wrapping. | |
errorType | string | Classification of what type of error this is, used programmatically by consumers to interpret the error | |
message | string | Error's message property, made readonly. Be specific, but also take care when including variable data to consider suitability for aggregation in telemetry Also avoid including any data that jeopardizes the user's privacy. Add a tagged telemetry property instead. | |
name | string | Error's name property, made readonly | |
stack | optional |
string | Error's stack property, made readonly |
Methods
Method | Return Type | Description |
---|---|---|
getTelemetryProperties() | ITelemetryProperties | Get the telemetry properties stashed on this error for logging |
Property Details
addTelemetryProperties
Add telemetry properties to this error which will be logged with the error
Signature
addTelemetryProperties: (props: ITelemetryProperties) => void;
Type: (props: ITelemetryProperties) => void
errorInstanceId
A Guid identifying this error instance. Useful in telemetry for deduping multiple logging events arising from the same error, or correlating an error with an inner error that caused it, in case of error wrapping.
Signature
readonly errorInstanceId: string;
Type: string
errorType
Classification of what type of error this is, used programmatically by consumers to interpret the error
Signature
readonly errorType: string;
Type: string
message
Error's message property, made readonly. Be specific, but also take care when including variable data to consider suitability for aggregation in telemetry Also avoid including any data that jeopardizes the user's privacy. Add a tagged telemetry property instead.
Signature
readonly message: string;
Type: string
name
Error's name property, made readonly
Signature
readonly name: string;
Type: string
stack
Error's stack property, made readonly
Signature
readonly stack?: string;
Type: string
Method Details
getTelemetryProperties
Get the telemetry properties stashed on this error for logging
Signature
getTelemetryProperties(): ITelemetryProperties;
Returns
Return type: ITelemetryProperties