Skip to content

Commit 84ae15e

Browse files
committed
logging: add the path of the widget to error log statement
And make it a warning to match the conditional log statement.
1 parent be30f96 commit 84ae15e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/evolution-frontend/src/actions/utils/Conditional.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const checkConditional = (
6363
} catch (error) {
6464
// If there is an error during conditional check, just ignore the error and hide the field to reduce probability of side-effects.
6565
// TODO: define a better way to deal with errors.
66-
console.warn(`conditional error for ${path}`, error);
66+
console.warn(`conditional error for ${path}:`, error);
6767
return [false, undefined, undefined];
6868
}
6969
} else {
@@ -108,8 +108,8 @@ export const checkChoiceConditional = (
108108
}
109109
} catch (error) {
110110
// If there is an error during conditional check, just ignore the error and hide the field to reduce probability of side-effects.
111-
// TODO: add a server-side log of the error and define a better way to deal with errors.
112-
console.log('choice conditional error', error);
111+
// TODO: find a better way to deal with errors.
112+
console.warn(`choice conditional error for path ${path}: `, error);
113113
return [false, undefined];
114114
}
115115
}

0 commit comments

Comments
 (0)