balderdashy/sails · error · sailsError

E_UNKNOWN_BIND_ERROR

E_UNKNOWN_BIND_ERROR

Error message

Error attempting to bind `${verb || 'ALL'} ${path}` to ${JSON.stringify(target)}: ${e.message}

What it means

Error "Error attempting to bind `${verb || 'ALL'} ${path}` to ${JSON.stringify(target)}: ${e.message}" thrown in balderdashy/sails.

Source

Thrown at lib/router/bind.js:135

}

/**
 * Bind a previously-loaded action to a URL.
 * (which should be a URL or redirectable path.)
 *
 * @api private
 */
function bindAction(path, target, verb, options) {

  var self = this;

  var sails = this.sails;

  var actionIdentity;
  try {
    actionIdentity = self.getActionIdentityForTarget(target);
  } catch (e) {
    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));
  }

  if (_.isObject(target)) {
    // Fold any other properties in the target into a shallow clone of the "options" dictionary
    options = _.extend({}, options, _.omit(target, 'action'));
  }

  // If there's no loaded action with that identity, log a warning and continue.
  if (!sails._actions[actionIdentity]) {
    sails.log.warn('Ignored attempt to bind route (' + path + ') to unknown action ::', target);
    return;
  }

  // Add "action" property to the route options, and set the _middlewareType property if the function doesn't already have one.
  _.extend(options || {}, {action: actionIdentity, _middlewareType: (sails._actions[actionIdentity] && sails._actions[actionIdentity]._middlewareType || 'ACTION: ' + actionIdentity)});

  // Loop through all of the registered action middleware, and find
  // any that should apply to the action with the given identity.

View on GitHub (pinned to 7b76422cc2)

When it happens

Trigger: Thrown at lib/router/bind.js:135 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/45802166bb10cefb. Report an issue: GitHub.