fix(services/flow): log after assigning error to prevent mutation
This commit is contained in:
@@ -31,8 +31,6 @@ export const processFlow = 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) {
|
||||||
$.triggerOutput.error = error.details;
|
$.triggerOutput.error = error.details;
|
||||||
} else {
|
} else {
|
||||||
@@ -42,6 +40,8 @@ export const processFlow = async (options) => {
|
|||||||
$.triggerOutput.error = { error: error.message };
|
$.triggerOutput.error = { error: error.message };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.error(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user