{"record":{"id":"da8a8bb375437883","repo":"balderdashy/sails","slug":"ignored-attempt-to-bind-route-path-to-unknown","errorCode":null,"errorMessage":"Ignored attempt to bind route (${path}) to unknown action :: ${target}","messagePattern":"Ignored attempt to bind route \\((.+?)\\) to unknown action :: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"lib/router/bind.js","lineNumber":145,"sourceCode":"  var self = this;\n\n  var sails = this.sails;\n\n  var actionIdentity;\n  try {\n    actionIdentity = self.getActionIdentityForTarget(target);\n  } catch (e) {\n    throw flaverr({name: e.name || 'sailsError', code: e.code || 'E_UNKNOWN_BIND_ERROR'}, new Error('Error attempting to bind `' + (verb || 'ALL') + ' ' + path + '` to ' + JSON.stringify(target) + ': ' + e.message));\n  }\n\n  if (_.isObject(target)) {\n    // Fold any other properties in the target into a shallow clone of the \"options\" dictionary\n    options = _.extend({}, options, _.omit(target, 'action'));\n  }\n\n  // If there's no loaded action with that identity, log a warning and continue.\n  if (!sails._actions[actionIdentity]) {\n    sails.log.warn('Ignored attempt to bind route (' + path + ') to unknown action ::', target);\n    return;\n  }\n\n  // Add \"action\" property to the route options, and set the _middlewareType property if the function doesn't already have one.\n  _.extend(options || {}, {action: actionIdentity, _middlewareType: (sails._actions[actionIdentity] && sails._actions[actionIdentity]._middlewareType || 'ACTION: ' + actionIdentity)});\n\n  // Loop through all of the registered action middleware, and find\n  // any that should apply to the action with the given identity.\n  var actionMiddlewareToRun = _.reduce(sails._actionMiddleware, function(memo, middlewareList, key) {\n    // Split the key into an array and sort it so that strings starting with '!' come first.\n    var targets = key.split(',').sort();\n    _.any(targets, function(target) {\n      // Remove any whitespace surrounding the target.\n      target = target.trim();\n      // If the target starts with a '!' (meaning that any actions matching it should _not_\n      // run the middleware), and the target matches, bust out of this loop early.\n      if (target[0] === '!') {\n        target = target.substr(1);","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/balderdashy/sails/blob/7b76422cc27823df033572bdda5c4910a68b697f/lib/router/bind.js#L127-L163","documentation":"When a route target specifies an action by identity (e.g. `'UserController.find'` or `'user/find'`), Sails checks `sails._actions` for a loaded action with that identity. If none exists, the route binding is skipped entirely with this warning — the route is not registered and requests to it will 404.","triggerScenarios":"Binding a route in config/routes.js to an action identity that was never loaded, e.g. `{'GET /foo': 'FooController.bar'}` when the controller file or action doesn't exist or failed to load.","commonSituations":"Typos in controller/action names, controllers in folders excluded from autoload, actions failing to load due to syntax errors earlier in lift, migrating camelCase/dashed action identities incorrectly between Sails versions.","solutions":["Fix the action identity in the route config to match a loaded controller action exactly","Verify the controller file exists in api/controllers and exports the action","Check earlier lift logs for controller load failures (syntax errors, bad requires)","Run `sails lift` verbosely to inspect the list of registered actions"],"exampleFix":"// before\n'GET /users': 'UserController.findd'\n// after\n'GET /users': 'UserController.find'","handlingStrategy":"validation","validationCode":"function assertActionExists(identity) {\n  if (!sails._actions[identity]) {\n    throw new Error(`Route target action '${identity}' is not registered; fix config/routes.js`);\n  }\n}\n// call after lift, before relying on the route","typeGuard":"function isBoundAction(identity) {\n  return typeof identity === 'string' && Boolean(sails._actions && sails._actions[identity]);\n}","tryCatchPattern":null,"preventionTips":["Match action identities exactly to controller file paths and exported names","Check lift output for controller load errors before debugging 404s","Keep controllers inside api/controllers so autoloading picks them up"],"tags":["routing","actions","controllers","sails"],"backgroundTag":"unknown-action-route-binding","analyzedSha":"7b76422cc27823df033572bdda5c4910a68b697f","analyzedAt":"2026-09-01T04:01:57.104Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}