diff --git a/reference/sails.config/sails.config.blueprints.md b/reference/sails.config/sails.config.blueprints.md index 111d0122b..0d058d39b 100644 --- a/reference/sails.config/sails.config.blueprints.md +++ b/reference/sails.config/sails.config.blueprints.md @@ -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;