Skip to content

Commit e3cda4a

Browse files
authored
Merge pull request #41245 from appsmithorg/release
22/09 Daily Promotion
2 parents b83387e + f71999b commit e3cda4a

File tree

22 files changed

+1508
-174
lines changed

22 files changed

+1508
-174
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ RUN <<END
2525
exit 1
2626
fi
2727

28-
if ! [ -f server/mongo/server.jar -a -f server/pg/server.jar ]; then
29-
echo "Missing one or both server.jar files in the right place. Are you using the build script?" >&2
28+
if ! [ -f server/mongo/server.jar ]; then
29+
echo "Missing MongoDB server.jar file. Are you using the build script?" >&2
3030
exit 1
3131
fi
3232
END

app/client/src/sagas/ActionExecution/PluginActionSaga.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,15 @@ export default function* executePluginActionTriggerSaga(
641641
} else {
642642
throw new PluginTriggerFailureError(
643643
createMessage(ERROR_PLUGIN_ACTION_EXECUTE, pluginActionNameToDisplay),
644-
[],
644+
[
645+
payload.body,
646+
params,
647+
{
648+
isExecutionSuccess: payload.isExecutionSuccess,
649+
statusCode: payload.statusCode,
650+
headers: payload.headers,
651+
},
652+
],
645653
);
646654
}
647655
} else {

app/client/src/sagas/EvaluationsSaga.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,8 +531,15 @@ export function* executeTriggerRequestSaga(
531531
// a success: false is sent to reject the promise
532532
// @ts-expect-error: reason is of type string
533533
responsePayload.error = {
534-
// @ts-expect-error: reason is of type string
535-
message: error.responseData?.[0] || error.message,
534+
message:
535+
// @ts-expect-error: reason is of type string
536+
error.responseData?.[0] && typeof error.responseData?.[0] === "string"
537+
? // @ts-expect-error: reason is of type string
538+
error.responseData?.[0]
539+
: // @ts-expect-error: reason is of type string
540+
error.message,
541+
// @ts-expect-error: responseData is of type array
542+
responseData: error.responseData || [],
536543
};
537544
}
538545

app/client/src/workers/Evaluation/fns/actionFns.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,27 @@ export default async function run(
6868
* */
6969
return response[0];
7070
} catch (e) {
71+
const error = {
72+
// TODO: Fix this the next time the file is edited
73+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
74+
message: (e as any).message,
75+
};
76+
77+
// If error contains responseData, update action data and responseMeta before throwing
78+
// @ts-expect-error: responseData is a custom property
79+
if (e.responseData && e.responseData.length > 0) {
80+
// @ts-expect-error: self type is not defined
81+
const action = self[this.name] as ActionEntity;
82+
// @ts-expect-error: responseData is array format
83+
const responseData = e.responseData;
84+
85+
if (action && responseData.length >= 3) {
86+
action.data = responseData[0]; // error response body
87+
action.responseMeta = responseData[2]; // { isExecutionSuccess, statusCode, headers }
88+
action.isLoading = false;
89+
}
90+
}
91+
7192
if (typeof onError === "function") {
7293
// TODO: Fix this the next time the file is edited
7394
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -76,7 +97,7 @@ export default async function run(
7697
return;
7798
}
7899

79-
throw e;
100+
throw error;
80101
}
81102
}
82103

app/server/appsmith-git/src/main/java/com/appsmith/git/service/BashService.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ private BashFunctionResult callFunctionUnBounded(String classpathResource, Strin
6363
"Bash execution failed: " + buildErrorDetails(output, error, exceptionError, exitCode));
6464
}
6565

66-
log.info("Script: {}", fullScript);
67-
log.info("Output: {}", output);
68-
log.info("Error: {}", error);
66+
log.info("Output: \n{}", output);
6967
log.info("Exit code: {}", exitCode);
7068

7169
outputStream.close();

0 commit comments

Comments
 (0)