Skip to content
This repository was archived by the owner on Aug 6, 2021. It is now read-only.
Open
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
5 changes: 5 additions & 0 deletions reference/sails.config/sails.config.blueprints.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ parseBlueprintOptions: function(req) {
if (queryOptions.criteria.limit > 100) {
queryOptions.criteria.limit = 100;
}
// NOTE: example only, `if` check above will prevent this error code executing
if (queryOptions.criteria.limit > 100) {
let msg = 'Limit needs to be 100 or under';
throw flaverr({ name: 'UsageError', code:'E_INVALID_LIMIT', details:msg }, new Error(msg));
}
}

return queryOptions;
Expand Down