diff --git a/packages/botbuilder-adapter-facebook/src/facebook_adapter.ts b/packages/botbuilder-adapter-facebook/src/facebook_adapter.ts index 63cf399fb..94060ed62 100644 --- a/packages/botbuilder-adapter-facebook/src/facebook_adapter.ts +++ b/packages/botbuilder-adapter-facebook/src/facebook_adapter.ts @@ -395,8 +395,7 @@ export class FacebookAdapter extends BotAdapter { } const context = new TurnContext(this, activity as Activity); - await this.runMiddleware(context, logic) - .catch((err) => { throw err; }); + await this.runMiddleware(context, logic); } /* diff --git a/packages/botbuilder-adapter-hangouts/src/hangouts_adapter.ts b/packages/botbuilder-adapter-hangouts/src/hangouts_adapter.ts index b1ceed62d..a0fc82855 100644 --- a/packages/botbuilder-adapter-hangouts/src/hangouts_adapter.ts +++ b/packages/botbuilder-adapter-hangouts/src/hangouts_adapter.ts @@ -327,8 +327,7 @@ export class HangoutsAdapter extends BotAdapter { context.turnState.set('httpStatus', 200); } - await this.runMiddleware(context, logic) - .catch((err) => { throw err; }); + await this.runMiddleware(context, logic); if (event.type === 'CARD_CLICKED') { // send http response back diff --git a/packages/botbuilder-adapter-slack/src/slack_adapter.ts b/packages/botbuilder-adapter-slack/src/slack_adapter.ts index 0aa463fa0..d990e3be0 100644 --- a/packages/botbuilder-adapter-slack/src/slack_adapter.ts +++ b/packages/botbuilder-adapter-slack/src/slack_adapter.ts @@ -514,8 +514,7 @@ export class SlackAdapter extends BotAdapter { context.turnState.set('httpStatus', 200); - await this.runMiddleware(context, logic) - .catch((err) => { throw err; }); + await this.runMiddleware(context, logic); // send http response back res.status(context.turnState.get('httpStatus')); @@ -569,8 +568,7 @@ export class SlackAdapter extends BotAdapter { context.turnState.set('httpStatus', 200); - await this.runMiddleware(context, logic) - .catch((err) => { throw err; }); + await this.runMiddleware(context, logic); // send http response back res.status(context.turnState.get('httpStatus')); @@ -618,8 +616,7 @@ export class SlackAdapter extends BotAdapter { context.turnState.set('httpStatus', 200); - await this.runMiddleware(context, logic) - .catch((err) => { throw err; }); + await this.runMiddleware(context, logic); // send http response back res.status(context.turnState.get('httpStatus')); diff --git a/packages/botbuilder-adapter-twilio-sms/src/twilio_adapter.ts b/packages/botbuilder-adapter-twilio-sms/src/twilio_adapter.ts index 84a83f450..1f3bd2e82 100644 --- a/packages/botbuilder-adapter-twilio-sms/src/twilio_adapter.ts +++ b/packages/botbuilder-adapter-twilio-sms/src/twilio_adapter.ts @@ -218,8 +218,7 @@ export class TwilioAdapter extends BotAdapter { context.turnState.set('httpStatus', 200); - await this.runMiddleware(context, logic) - .catch((err) => { throw err; }); + await this.runMiddleware(context, logic); // send http response back res.status(context.turnState.get('httpStatus')); diff --git a/packages/botbuilder-adapter-web/src/web_adapter.ts b/packages/botbuilder-adapter-web/src/web_adapter.ts index 5123be7d3..f62c21d0f 100644 --- a/packages/botbuilder-adapter-web/src/web_adapter.ts +++ b/packages/botbuilder-adapter-web/src/web_adapter.ts @@ -294,8 +294,7 @@ export class WebAdapter extends BotAdapter { context.turnState.set('httpStatus', 200); - await this.runMiddleware(context, logic) - .catch((err) => { throw err; }); + await this.runMiddleware(context, logic); // send http response back res.status(context.turnState.get('httpStatus')); diff --git a/packages/botkit/src/core.ts b/packages/botkit/src/core.ts index 242094c1c..d7eb22b3e 100644 --- a/packages/botkit/src/core.ts +++ b/packages/botkit/src/core.ts @@ -685,7 +685,7 @@ export class Botkit { const dialogContext = await this.dialogSet.createContext(turnContext); // Spawn a bot worker with the dialogContext - const bot = await this.spawn(dialogContext).catch((err) => { throw err; }); + const bot = await this.spawn(dialogContext); // Turn this turnContext into a Botkit message. const message: BotkitMessage = {