balderdashy/sails · error · UsageError
The associated ids provided in this request (for the `${req.
Error message
The associated ids provided in this request (for the `${req.options.alias}` collection) are not valid. If specified as a string, the associated ids provided to the "replace" blueprint action must be parseable as a JSON array, e.g. `[1, 2]`. What it means
Error "The associated ids provided in this request (for the `${req.options.alias}` collection) are not valid. If specified as a string, the associated ids provided to the "replace" blueprint action must be parseable as a JSON array, e.g. `[1, 2]`." thrown in balderdashy/sails.
Source
Thrown at lib/hooks/blueprints/parse-blueprint-options.js:416
throw new Error('Missing required route option, `req.options.alias`.');
}
queryOptions.alias = req.options.alias;
queryOptions.criteria = {};
queryOptions.criteria = {
where: {}
};
queryOptions.targetRecordId = req.param('parentid');
queryOptions.associatedIds = _.isArray(req.body) ? req.body : req.query[req.options.alias];
if (_.isString(queryOptions.associatedIds)) {
try {
queryOptions.associatedIds = JSON.parse(queryOptions.associatedIds);
} catch (e) {
throw flaverr({ name: 'UsageError', raw: e }, new Error(
'The associated ids provided in this request (for the `' + req.options.alias + '` collection) are not valid. '+
'If specified as a string, the associated ids provided to the "replace" blueprint action must be parseable as '+
'a JSON array, e.g. `[1, 2]`.'
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// FUTURE: Use smart example depending on the expected pk type (e.g. if string, show mongo ids instead)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
));
}//</catch>
}
break;
// ██████╗ ██████╗ ██████╗ ██╗ ██╗██╗ █████╗ ████████╗███████╗
// ██╔══██╗██╔═══██╗██╔══██╗██║ ██║██║ ██╔══██╗╚══██╔══╝██╔════╝
// ██████╔╝██║ ██║██████╔╝██║ ██║██║ ███████║ ██║ █████╗
// ██╔═══╝ ██║ ██║██╔═══╝ ██║ ██║██║ ██╔══██║ ██║ ██╔══╝
// ██║ ╚██████╔╝██║ ╚██████╔╝███████╗██║ ██║ ██║ ███████╗
// ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝View on GitHub (pinned to 7b76422cc2)
When it happens
Trigger: Thrown at lib/hooks/blueprints/parse-blueprint-options.js:416 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of balderdashy/sails@7b76422cc2 (2026-09-01).
Data as JSON: /api/errors/8298a98a597b3bd0.
Report an issue: GitHub.