diff --git a/examples/conversationbot2.py b/examples/conversationbot2.py index 2f5cc8347..6c8449bc3 100644 --- a/examples/conversationbot2.py +++ b/examples/conversationbot2.py @@ -102,7 +102,7 @@ def done(update, context): def error(update, context): """Log Errors caused by Updates.""" - logger.warning('Update "%s" caused error "%s"', update, error) + logger.warning('Update "%s" caused error "%s"', update, context.error) def main(): diff --git a/examples/persistentconversationbot.py b/examples/persistentconversationbot.py index 637ae7e8d..366f56245 100644 --- a/examples/persistentconversationbot.py +++ b/examples/persistentconversationbot.py @@ -113,7 +113,7 @@ def done(update, context): def error(update, context): """Log Errors caused by Updates.""" - logger.warning('Update "%s" caused error "%s"', update, error) + logger.warning('Update "%s" caused error "%s"', update, context.error) def main():