Fix undefined key error message

master
Sven Slootweg 1 year ago
parent 7971e32d37
commit 417eb403fa

@ -15,6 +15,7 @@ const loadModules = require("./load-modules");
// FIXME: $getProperty, $getPropertyPath, maybe $resolveObject/$query?
// FIXME: Allow setting an evaluation depth limit for queries, to limit eg. recursion
// FIXME: recurseDepth, recurseLabel/recurseGoto
// TODO: Internal queries, but only in modules, and only as a last resort
/* Process design:
@ -154,7 +155,7 @@ function makeEnvironment(context, getContextForModule) {
assignErrorPath(error, cursor);
});
} else {
throw new Error(`No key '${schemaKey}' exists in the schema`);
throw new Error(`No key '${cursor.schemaPath.at(-1)}' exists in the schema`);
}
}

Loading…
Cancel
Save