Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion samples/Core-Bot/adapter_with_error_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(
self._conversation_state = conversation_state

# Catch-all for errors.
async def on_error(self, context: TurnContext, error: Exception):
async def on_error(context: TurnContext, error: Exception):
# This check writes out errors to console log
# NOTE: In production environment, you should consider logging this to Azure
# application insights.
Expand All @@ -34,6 +34,7 @@ async def on_error(self, context: TurnContext, error: Exception):
)
await context.send_activity(error_message)
# Clear out state
nonlocal self
await self._conversation_state.delete(context)

self.on_turn_error = on_error
5 changes: 2 additions & 3 deletions samples/Core-Bot/dialogs/booking_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, dialog_id: str = None):
super(BookingDialog, self).__init__(dialog_id or BookingDialog.__name__)

self.add_dialog(TextPrompt(TextPrompt.__name__))
# self.add_dialog(ConfirmPrompt(ConfirmPrompt.__name__))
self.add_dialog(ConfirmPrompt(ConfirmPrompt.__name__))
self.add_dialog(DateResolverDialog(DateResolverDialog.__name__))
self.add_dialog(
WaterfallDialog(
Expand All @@ -25,7 +25,7 @@ def __init__(self, dialog_id: str = None):
self.destination_step,
self.origin_step,
self.travel_date_step,
# self.confirm_step,
self.confirm_step,
self.final_step,
],
)
Expand Down Expand Up @@ -133,7 +133,6 @@ async def final_step(self, step_context: WaterfallStepContext) -> DialogTurnResu

if step_context.result:
booking_details = step_context.options
booking_details.travel_date = step_context.result

return await step_context.end_dialog(booking_details)
return await step_context.end_dialog()
Expand Down