fix: remove "Error when determining async func" (#12683)
- Add logs for debugging
This commit is contained in:
parent
76d9f2b9fc
commit
7626d75ccf
|
|
@ -95,7 +95,7 @@ export default class DataTreeEvaluator {
|
||||||
errors: EvalError[] = [];
|
errors: EvalError[] = [];
|
||||||
resolvedFunctions: Record<string, any> = {};
|
resolvedFunctions: Record<string, any> = {};
|
||||||
currentJSCollectionState: Record<string, any> = {};
|
currentJSCollectionState: Record<string, any> = {};
|
||||||
logs: any[] = [];
|
logs: unknown[] = [];
|
||||||
allActionValidationConfig?: { [actionId: string]: ActionValidationConfigMap };
|
allActionValidationConfig?: { [actionId: string]: ActionValidationConfigMap };
|
||||||
public hasCyclicalDependency = false;
|
public hasCyclicalDependency = false;
|
||||||
constructor(
|
constructor(
|
||||||
|
|
@ -1076,6 +1076,7 @@ export default class DataTreeEvaluator {
|
||||||
action.value,
|
action.value,
|
||||||
unEvalDataTree,
|
unEvalDataTree,
|
||||||
this.resolvedFunctions,
|
this.resolvedFunctions,
|
||||||
|
this.logs,
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -354,6 +354,7 @@ export function isFunctionAsync(
|
||||||
userFunction: unknown,
|
userFunction: unknown,
|
||||||
dataTree: DataTree,
|
dataTree: DataTree,
|
||||||
resolvedFunctions: Record<string, any>,
|
resolvedFunctions: Record<string, any>,
|
||||||
|
logs: unknown[] = [],
|
||||||
) {
|
) {
|
||||||
return (function() {
|
return (function() {
|
||||||
/**** Setting the eval context ****/
|
/**** Setting the eval context ****/
|
||||||
|
|
@ -415,7 +416,9 @@ export function isFunctionAsync(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Error when determining async function", e);
|
// We do not want to throw errors for internal operations, to users.
|
||||||
|
// logLevel should help us in debugging this.
|
||||||
|
logs.push({ error: "Error when determining async function" + e });
|
||||||
}
|
}
|
||||||
const isAsync = !!self.IS_ASYNC;
|
const isAsync = !!self.IS_ASYNC;
|
||||||
for (const entity in GLOBAL_DATA) {
|
for (const entity in GLOBAL_DATA) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user