fix(services/action): log after assigning error to prevent mutation

This commit is contained in:
Ali BARIN
2025-01-27 16:17:34 +00:00
parent 6b70e29789
commit f168f48efb

View File

@@ -51,8 +51,6 @@ export const processAction = async (options) => {
const shouldNotConsiderAsError = shouldEarlyExit || shouldNotProcess;
if (!shouldNotConsiderAsError) {
logger.error(error);
if (error instanceof HttpError) {
$.actionOutput.error = error.details;
} else {
@@ -62,6 +60,8 @@ export const processAction = async (options) => {
$.actionOutput.error = { error: error.message };
}
}
logger.error(error);
}
}