Handle erroneous input better

This commit is contained in:
Yarmo Mackenbach 2020-11-05 12:57:13 +01:00
parent 51506b4a93
commit 05d6986349

View file

@ -32,7 +32,9 @@ const runOnJson = (res, proofData, checkPath, checkClaim, checkRelation) => {
return res
}
if (!(checkPath[0] in proofData)) {
try {
checkPath[0] in proofData
} catch(e) {
res.errors.push('err_data_structure_incorrect')
return res
}