Skip to main content
Version: v1

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

PropertyModifiersTypeDescription
addTelemetryProperties(props: ITelemetryProperties) => voidAdd telemetry properties to this error which will be logged with the error
errorInstanceIdstringA 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.
errorTypestringClassification of what type of error this is, used programmatically by consumers to interpret the error
messagestringError'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.
namestringError's name property, made readonly
stackoptionalstringError's stack property, made readonly

Methods

MethodReturn TypeDescription
getTelemetryProperties()ITelemetryPropertiesGet 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