Merge branch 'hotfix/action-error' into 'release'

Creating the actionExecutionResult object for error scenarios as well.

See merge request theappsmith/internal-tools-server!354
This commit is contained in:
Arpit Mohan 2020-05-23 07:23:13 +00:00
commit a569156029

View File

@ -427,6 +427,13 @@ public class ActionServiceImpl extends BaseService<ActionRepository, Action, Str
datasourceConfiguration,
actionConfiguration))
.timeout(Duration.ofMillis(timeoutDuration))
.onErrorResume(e -> {
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);