From 71fb485f8d858ad48929ac70bdb7a7d88c7acdfd Mon Sep 17 00:00:00 2001 From: Pawan Koshti Date: Wed, 4 Sep 2024 15:50:41 +0530 Subject: [PATCH] Specified local debugging inside the adapter --- .../AdapterWithErrorHandler.cs | 6 +++--- samples/msgext-doc-search-js/src/index.js | 6 +++--- .../AdapterWithErrorHandler.cs | 6 +++--- samples/msgext-multiparam-js/src/index.js | 6 +++--- samples/msgext-multiparam-ts/src/index.ts | 6 +++--- .../src/index.ts | 6 +++--- .../AdapterWithErrorHandler.cs | 6 +++--- samples/msgext-northwind-inventory-ts/src/index.ts | 6 +++--- .../AdapterWithErrorHandler.cs | 6 +++--- samples/msgext-product-support-sso-ts/src/index.ts | 14 +++++++------- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/samples/msgext-doc-search-csharp/AdapterWithErrorHandler.cs b/samples/msgext-doc-search-csharp/AdapterWithErrorHandler.cs index 5ac7dfca..81966aae 100644 --- a/samples/msgext-doc-search-csharp/AdapterWithErrorHandler.cs +++ b/samples/msgext-doc-search-csharp/AdapterWithErrorHandler.cs @@ -17,9 +17,9 @@ public AdapterWithErrorHandler(BotFrameworkAuthentication auth, ILogger { // configuration instructions. console.error(`\n [onTurnError] unhandled error: ${error}`); - // Send a message to the user - await context.sendActivity(`The bot encountered an unhandled error:\n ${error.message}`); - await context.sendActivity("To continue to run this bot, please fix the bot source code."); + // Uncomment below commented line for local debugging. + // await context.sendActivity(`The bot encountered an unhandled error:\n ${error.message}`); + // await context.sendActivity("To continue to run this bot, please fix the bot source code."); }; // Create the bot that will handle incoming messages. diff --git a/samples/msgext-multiparam-csharp/AdapterWithErrorHandler.cs b/samples/msgext-multiparam-csharp/AdapterWithErrorHandler.cs index c619c879..2d312a80 100644 --- a/samples/msgext-multiparam-csharp/AdapterWithErrorHandler.cs +++ b/samples/msgext-multiparam-csharp/AdapterWithErrorHandler.cs @@ -17,9 +17,9 @@ public AdapterWithErrorHandler(BotFrameworkAuthentication auth, ILogger { // configuration instructions. console.error(`\n [onTurnError] unhandled error: ${error}`); - // Send a message to the user - await context.sendActivity(`The bot encountered an unhandled error:\n ${error.message}`); - await context.sendActivity("To continue to run this bot, please fix the bot source code."); + // Uncomment below commented line for local debugging. + // await context.sendActivity(`The bot encountered an unhandled error:\n ${error.message}`); + // await context.sendActivity("To continue to run this bot, please fix the bot source code."); }; // Create the bot that will handle incoming messages. diff --git a/samples/msgext-multiparam-ts/src/index.ts b/samples/msgext-multiparam-ts/src/index.ts index e9116440..f5f3a158 100644 --- a/samples/msgext-multiparam-ts/src/index.ts +++ b/samples/msgext-multiparam-ts/src/index.ts @@ -44,9 +44,9 @@ const onTurnErrorHandler = async (context: TurnContext, error: Error) => { "TurnError" ); - // Send a message to the user - await context.sendActivity(`The bot encountered unhandled error:\n ${error.message}`); - await context.sendActivity("To continue to run this bot, please fix the bot source code."); + // Uncomment below commented line for local debugging. + // await context.sendActivity(`The bot encountered unhandled error:\n ${error.message}`); + // await context.sendActivity("To continue to run this bot, please fix the bot source code."); }; // Set the onTurnError for the singleton CloudAdapter. diff --git a/samples/msgext-northwind-inventory-action-ts/src/index.ts b/samples/msgext-northwind-inventory-action-ts/src/index.ts index b1f88483..0a2446e4 100644 --- a/samples/msgext-northwind-inventory-action-ts/src/index.ts +++ b/samples/msgext-northwind-inventory-action-ts/src/index.ts @@ -44,9 +44,9 @@ const onTurnErrorHandler = async (context: TurnContext, error: Error) => { "TurnError" ); - // Send a message to the user - await context.sendActivity(`The bot encountered unhandled error:\n ${error.message}`); - await context.sendActivity("To continue to run this bot, please fix the bot source code."); + // Uncomment below commented line for local debugging. + // await context.sendActivity(`The bot encountered unhandled error:\n ${error.message}`); + // await context.sendActivity("To continue to run this bot, please fix the bot source code."); }; // Set the onTurnError for the singleton CloudAdapter. diff --git a/samples/msgext-northwind-inventory-csharp/AdapterWithErrorHandler.cs b/samples/msgext-northwind-inventory-csharp/AdapterWithErrorHandler.cs index bd4bc02e..779c5a7d 100644 --- a/samples/msgext-northwind-inventory-csharp/AdapterWithErrorHandler.cs +++ b/samples/msgext-northwind-inventory-csharp/AdapterWithErrorHandler.cs @@ -21,9 +21,9 @@ public AdapterWithErrorHandler(BotFrameworkAuthentication auth, ILogger { "TurnError" ); - // Send a message to the user - await context.sendActivity(`The bot encountered unhandled error:\n ${error.message}`); - await context.sendActivity("To continue to run this bot, please fix the bot source code."); + // Uncomment below commented line for local debugging. + // await context.sendActivity(`The bot encountered unhandled error:\n ${error.message}`); + // await context.sendActivity("To continue to run this bot, please fix the bot source code."); }; // Set the onTurnError for the singleton CloudAdapter. diff --git a/samples/msgext-product-support-sso-csharp/AdapterWithErrorHandler.cs b/samples/msgext-product-support-sso-csharp/AdapterWithErrorHandler.cs index 83513e50..7ff9df64 100644 --- a/samples/msgext-product-support-sso-csharp/AdapterWithErrorHandler.cs +++ b/samples/msgext-product-support-sso-csharp/AdapterWithErrorHandler.cs @@ -17,9 +17,9 @@ public AdapterWithErrorHandler(BotFrameworkAuthentication auth, ILogger { "TurnError" ); - // Send a message to the user - await context.sendActivity( - `The bot encountered unhandled error:\n ${error.message}` - ); - await context.sendActivity( - "To continue to run this bot, please fix the bot source code." - ); + // Uncomment below commented line for local debugging. + // await context.sendActivity( + // `The bot encountered unhandled error:\n ${error.message}` + // ); + // await context.sendActivity( + // "To continue to run this bot, please fix the bot source code." + // ); }; // Set the onTurnError for the singleton CloudAdapter.