From e6b7ffca9c534718c994638c354a603209d73f70 Mon Sep 17 00:00:00 2001 From: Arpit Mohan Date: Sat, 23 May 2020 12:49:01 +0530 Subject: [PATCH] Creating the actionExecutionResult object for error scenarios as well. This ensures that we can populate the request fields for all action executions --- .../com/appsmith/server/services/ActionServiceImpl.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ActionServiceImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ActionServiceImpl.java index 37584068e6..5bfcdc1420 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ActionServiceImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ActionServiceImpl.java @@ -427,6 +427,13 @@ public class ActionServiceImpl extends BaseService { + log.debug("In the action execution error mode. Cause: {}", e.getMessage()); + ActionExecutionResult result = new ActionExecutionResult(); + result.setBody(e.getMessage()); + result.setIsExecutionSuccess(false); + return Mono.just(result); + }) .map(obj -> populateRequestFields(actionConfiguration, (ActionExecutionResult) obj)); })) .flatMap(obj -> obj);