Skip to content

Commit 57f49d8

Browse files
committed
atom is not defined in this function
1 parent 8dc3d80 commit 57f49d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Adapters/Storage/Mongo/MongoTransform.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ function transformConstraint(constraint, inArray) {
492492
case '$eq':
493493
answer[key] = inArray ? transformInteriorAtom(constraint[key]) : transformTopLevelAtom(constraint[key]);
494494
if (answer[key] === CannotTransform) {
495-
throw new Parse.Error(Parse.Error.INVALID_JSON, `bad atom: ${constraint[key]}`);
495+
throw new Parse.Error(Parse.Error.INVALID_JSON, `bad constraint: ${key} ${JSON.stringify(constraint)}`);
496496
}
497497
break;
498498

@@ -505,7 +505,7 @@ function transformConstraint(constraint, inArray) {
505505
answer[key] = arr.map(value => {
506506
let result = inArray ? transformInteriorAtom(value) : transformTopLevelAtom(value);
507507
if (result === CannotTransform) {
508-
throw new Parse.Error(Parse.Error.INVALID_JSON, `bad atom: ${value}`);
508+
throw new Parse.Error(Parse.Error.INVALID_JSON, `bad constraint: ${key} ${JSON.stringify(value)} ${JSON.stringify(constraint)}`);
509509
}
510510
return result;
511511
});

0 commit comments

Comments
 (0)