Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ export default class ExpressionValidator implements AstValidator<Expression> {
if (!expr.$resolvedType) {
if (isAuthInvocation(expr)) {
// check was done at link time
accept('error', 'auth() cannot be resolved because no "User" model is defined', { node: expr });
accept(
'error',
'auth() cannot be resolved because no model marked wth "@@auth()" or named "User" is found',
{ node: expr }
);
} else if (isCollectionPredicate(expr)) {
accept('error', 'collection predicate can only be used on an array of model type', { node: expr });
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ describe('Attribute tests', () => {
@@allow('all', auth() != null)
}
`)
).toContain(`auth() cannot be resolved because no "User" model is defined`);
).toContain(`auth() cannot be resolved because no model marked wth "@@auth()" or named "User" is found`);

await loadModel(`
${prelude}
Expand Down