Skip to content

Commit 95c2045

Browse files
committed
Better error msg when schema and data mismatch
1 parent 98db047 commit 95c2045

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/form.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export default class Form extends React.Component {
2020
try {
2121
data = getSyncedData(data, this.schema);
2222
} catch (error) {
23-
console.log("Error: Schema and data don't match");
24-
console.log(error);
23+
console.error("Error: Schema and data structure don't match");
24+
console.error(error);
2525
}
2626
}
2727

@@ -107,7 +107,7 @@ export default class Form extends React.Component {
107107
} catch (error) {
108108
formGroups = (
109109
<p style={{color: '#f00'}}>
110-
<strong>(!) Error:</strong> Schema and data do not match.
110+
<strong>(!) Error:</strong> Schema and data structure do not match.
111111
</p>
112112
);
113113
}

0 commit comments

Comments
 (0)