From 4b5f9828db6f3260bf6afae99de23e3cb553d7f6 Mon Sep 17 00:00:00 2001 From: maheshsattala <59285563+maheshsattala@users.noreply.github.com> Date: Fri, 27 Sep 2024 11:03:40 +0530 Subject: [PATCH] Executor logs error fix (#1542) * Raised the specific error from response-payload-body instead of all the response. * Raised the specific error from response-payload-body instead of all the response. --- kairon/shared/cloud/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kairon/shared/cloud/utils.py b/kairon/shared/cloud/utils.py index c9a9a6bcc..b1004eaae 100644 --- a/kairon/shared/cloud/utils.py +++ b/kairon/shared/cloud/utils.py @@ -83,7 +83,8 @@ def trigger_lambda(event_class: EventClass, env_data: dict, task_type: TASK_TYPE logger.info(response) if CloudUtility.lambda_execution_failed(response): - raise AppException(response) + err = response['Payload'].get('body') or response + raise AppException(err) except Exception as e: exception = str(e) CloudUtility.log_task(event_class=event_class, task_type=task_type, data=env_data,