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;
|
const shouldNotConsiderAsError = shouldEarlyExit || shouldNotProcess;
|
||||||
|
|
||||||
if (!shouldNotConsiderAsError) {
|
if (!shouldNotConsiderAsError) {
|
||||||
logger.error(error);
|
|
||||||
|
|
||||||
if (error instanceof HttpError) {
|
if (error instanceof HttpError) {
|
||||||
$.actionOutput.error = error.details;
|
$.actionOutput.error = error.details;
|
||||||
} else {
|
} else {
|
||||||
@@ -62,6 +60,8 @@ export const processAction = async (options) => {
|
|||||||
$.actionOutput.error = { error: error.message };
|
$.actionOutput.error = { error: error.message };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.error(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user