fix(services/action): log after assigning error to prevent mutation
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user