From d40f73fd29616e7b144c02eab854e9c169b076ff Mon Sep 17 00:00:00 2001 From: Jeremie Lecomte <63231522+jlecomte-IED@users.noreply.github.com> Date: Tue, 17 Nov 2020 22:35:35 +0100 Subject: [PATCH 1/3] Update lambda_function.py --- lambda/py/lambda_function.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lambda/py/lambda_function.py b/lambda/py/lambda_function.py index d45b849..74b8501 100644 --- a/lambda/py/lambda_function.py +++ b/lambda/py/lambda_function.py @@ -166,7 +166,7 @@ def handle(self, handler_input, exception): logger.info("In CatchAllExceptionHandler") logger.error(exception, exc_info=True) - handler_input.response_builder.speak(EXCEPTION_MESSAGE).ask( + handler_input.response_builder.speak(ERROR_MESSAGE).ask( HELP_REPROMPT) return handler_input.response_builder.response From f158dac11db12cd1c48c6146777fb58967d211e2 Mon Sep 17 00:00:00 2001 From: Jeremie Lecomte <63231522+jlecomte-IED@users.noreply.github.com> Date: Tue, 17 Nov 2020 23:22:42 +0100 Subject: [PATCH 2/3] Update lambda_function.py --- lambda/py/lambda_function.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lambda/py/lambda_function.py b/lambda/py/lambda_function.py index 74b8501..8f0e173 100644 --- a/lambda/py/lambda_function.py +++ b/lambda/py/lambda_function.py @@ -166,8 +166,8 @@ def handle(self, handler_input, exception): logger.info("In CatchAllExceptionHandler") logger.error(exception, exc_info=True) - handler_input.response_builder.speak(ERROR_MESSAGE).ask( - HELP_REPROMPT) + handler_input.response_builder.speak(prompts.ERROR_MESSAGE).ask( + prompts.HELP_REPROMPT) return handler_input.response_builder.response From e33768bcf78fc6c8e9d82efdefb5f7960bb1c689 Mon Sep 17 00:00:00 2001 From: Jeremie Lecomte <63231522+jlecomte-IED@users.noreply.github.com> Date: Tue, 17 Nov 2020 23:35:19 +0100 Subject: [PATCH 3/3] Update lambda_function.py --- lambda/py/lambda_function.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lambda/py/lambda_function.py b/lambda/py/lambda_function.py index 8f0e173..f4c74f0 100644 --- a/lambda/py/lambda_function.py +++ b/lambda/py/lambda_function.py @@ -165,9 +165,13 @@ def handle(self, handler_input, exception): # type: (HandlerInput, Exception) -> Response logger.info("In CatchAllExceptionHandler") logger.error(exception, exc_info=True) - - handler_input.response_builder.speak(prompts.ERROR_MESSAGE).ask( - prompts.HELP_REPROMPT) + # get localization data + data = handler_input.attributes_manager.request_attributes["_"] + prompt = data[prompts.ERROR_MESSAGE] + reprompt = data[prompts.HELP_REPROMPT] + + handler_input.response_builder.speak(prompt).ask( + reprompt) return handler_input.response_builder.response