From c867a5e87676fcf0e42716e298d50ed45ccd99a4 Mon Sep 17 00:00:00 2001 From: Bowen Song Date: Fri, 15 Mar 2024 10:46:05 +0800 Subject: [PATCH] docs: show detailed error message in custom api template (#11093) --- templates/js/custom-copilot-rag-custom-api/src/adapter.js | 3 +-- templates/ts/custom-copilot-rag-custom-api/src/adapter.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/templates/js/custom-copilot-rag-custom-api/src/adapter.js b/templates/js/custom-copilot-rag-custom-api/src/adapter.js index c0929d1888..8fa2f6feb7 100644 --- a/templates/js/custom-copilot-rag-custom-api/src/adapter.js +++ b/templates/js/custom-copilot-rag-custom-api/src/adapter.js @@ -39,8 +39,7 @@ const onTurnErrorHandler = async (context, error) => { ); // Send a message to the user - await context.sendActivity("The bot encountered an error or bug."); - await context.sendActivity("To continue to run this bot, please fix the bot source code."); + await context.sendActivity(`The bot encountered an error or bug: ${error.message}`); } }; diff --git a/templates/ts/custom-copilot-rag-custom-api/src/adapter.ts b/templates/ts/custom-copilot-rag-custom-api/src/adapter.ts index 1cf10f4bb8..a0d306983b 100644 --- a/templates/ts/custom-copilot-rag-custom-api/src/adapter.ts +++ b/templates/ts/custom-copilot-rag-custom-api/src/adapter.ts @@ -40,8 +40,7 @@ const onTurnErrorHandler = async (context, error) => { ); // Send a message to the user - await context.sendActivity("The bot encountered an error or bug."); - await context.sendActivity("To continue to run this bot, please fix the bot source code."); + await context.sendActivity(`The bot encountered an error or bug: ${error.message}`); } };