@microsoft/omnichannel-chat-sdk
Version:
Microsoft Omnichannel Chat SDK
30 lines (29 loc) • 1.53 kB
TypeScript
/**
* Utilities to suppress exception on failures in ChatSDK.
*
* It should catch an exception, then silently fail. Not every exception thrown should be known by the user.
*
* An exception details object would be logged in telemetry with ChatSDK standard errors as response with the exception object if any.
*
* If a longer message needs to displayed to the user, a console.error() would be preferred.
*
* Stack trace should only be logged and not printed.
*/
import { ChatSDKErrorName } from "../core/ChatSDKError";
import ScenarioMarker from "../telemetry/ScenarioMarker";
import TelemetryEvent from "../telemetry/TelemetryEvent";
export declare const suppressChatSDKError: (chatSDKError: ChatSDKErrorName, e: unknown, scenarioMarker: ScenarioMarker, telemetryEvent: TelemetryEvent, telemetryData?: {
[key: string]: string;
}, message?: string) => void;
export declare const suppressConversationDetailsRetrievalFailure: (e: unknown, scenarioMarker: ScenarioMarker, telemetryEvent: TelemetryEvent, telemetryData?: {
[key: string]: string;
}) => void;
declare const _default: {
suppressChatSDKError: (chatSDKError: ChatSDKErrorName, e: unknown, scenarioMarker: ScenarioMarker, telemetryEvent: TelemetryEvent, telemetryData?: {
[key: string]: string;
}, message?: string) => void;
suppressConversationDetailsRetrievalFailure: (e: unknown, scenarioMarker: ScenarioMarker, telemetryEvent: TelemetryEvent, telemetryData?: {
[key: string]: string;
}) => void;
};
export default _default;