{"record":{"id":"8298a98a597b3bd0","repo":"balderdashy/sails","slug":"the-associated-ids-provided-in-this-request-for-t","errorCode":null,"errorMessage":"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]`.","messagePattern":"The associated ids provided in this request \\(for the `(.+?)` 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\\]`\\.","errorType":"exception","errorClass":"UsageError","httpStatus":null,"severity":"error","filePath":"lib/hooks/blueprints/parse-blueprint-options.js","lineNumber":416,"sourceCode":"        throw new Error('Missing required route option, `req.options.alias`.');\n      }\n      queryOptions.alias = req.options.alias;\n\n      queryOptions.criteria = {};\n\n      queryOptions.criteria = {\n        where: {}\n      };\n\n      queryOptions.targetRecordId = req.param('parentid');\n\n      queryOptions.associatedIds = _.isArray(req.body) ? req.body : req.query[req.options.alias];\n\n      if (_.isString(queryOptions.associatedIds)) {\n        try {\n          queryOptions.associatedIds = JSON.parse(queryOptions.associatedIds);\n        } catch (e) {\n          throw flaverr({ name: 'UsageError', raw: e }, new Error(\n            'The associated ids provided in this request (for the `' + req.options.alias + '` collection) are not valid.  '+\n            'If specified as a string, the associated ids provided to the \"replace\" blueprint action must be parseable as '+\n            'a JSON array, e.g. `[1, 2]`.'\n            // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n            // FUTURE: Use smart example depending on the expected pk type (e.g. if string, show mongo ids instead)\n            // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n          ));\n        }//</catch>\n      }\n\n      break;\n\n    //  ██████╗  ██████╗ ██████╗ ██╗   ██╗██╗      █████╗ ████████╗███████╗\n    //  ██╔══██╗██╔═══██╗██╔══██╗██║   ██║██║     ██╔══██╗╚══██╔══╝██╔════╝\n    //  ██████╔╝██║   ██║██████╔╝██║   ██║██║     ███████║   ██║   █████╗\n    //  ██╔═══╝ ██║   ██║██╔═══╝ ██║   ██║██║     ██╔══██║   ██║   ██╔══╝\n    //  ██║     ╚██████╔╝██║     ╚██████╔╝███████╗██║  ██║   ██║   ███████╗\n    //  ╚═╝      ╚═════╝ ╚═╝      ╚═════╝ ╚══════╝╚═╝  ╚═╝   ╚═╝   ╚══════╝","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/balderdashy/sails/blob/7b76422cc27823df033572bdda5c4910a68b697f/lib/hooks/blueprints/parse-blueprint-options.js#L398-L434","documentation":"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.","triggerScenarios":"Thrown at lib/hooks/blueprints/parse-blueprint-options.js:416 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b76422cc27823df033572bdda5c4910a68b697f","analyzedAt":"2026-09-01T04:01:57.104Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}