balderdashy/sails · info

See http://sailsjs.com/docs/concepts/routes/url-slugs for mo

Error message

See http://sailsjs.com/docs/concepts/routes/url-slugs for more info.

What it means

This is the second line of the same warning as error 127: after the skipAssets warning, Sails logs a pointer to the URL-slugs documentation and prints a blank line. It never appears alone; it always accompanies the skipAssets warning for the same route address.

Source

Thrown at lib/router/index.js:378

  // Updated the sorted route address cache
  sortedRouteAddresses = sortRouteAddresses(_.keys(this.explicitRoutes));

  // Iterate over each address and bind the route that the address is for.
  _.each(sortedRouteAddresses, function(address) {
    var target = self.explicitRoutes[address];
    var verb = detectVerb(address).verb;

    // If the route address ends in a pattern var (e.g. /:id) or a wildcard (i.e. /*)
    // and it declares a method that could be used to request an asset, and the route
    // doesn't explicitly declare `skipAssets` true or false, then it should!
    var shouldDeclareSkipAssets = (
      _.isUndefined(target.skipAssets) &&
      (address.match(/\/\*\/?$/) || address.match(/^r\|/)) &&
      (!verb || _.contains(['all', 'get', 'head', 'options'], verb))
    );
    if (shouldDeclareSkipAssets) {
      sails.log.warn('Warning: route `' + address + '` should explicitly declare `skipAssets: true` or `skipAssets: false` to ensure correct handling of assets!');
      sails.log.warn('See http://sailsjs.com/docs/concepts/routes/url-slugs for more info.');
      console.log();
    }

    self.bind(address, target);
  });

  // Fired after static routes are bound
  sails.emit('router:after');
};


/**
 * Given a route target configuration, return an action identity for that target.
 * @param  {Dictionary|String} target The route target to get an action identity for
 * @return {String}        An action identity like `user/find`
 */
Router.prototype.getActionIdentityForTarget = function getActionIdentityForTarget(target) {

View on GitHub (pinned to 7b76422cc2)

Solutions

  1. Fix the route as described for the preceding warning (declare skipAssets explicitly) and this log line disappears with it
  2. Ignore it if intentionally leaving skipAssets unset

Example fix

// before
'/*': { controller: 'PageController', action: 'home' }
// after
'/*': { controller: 'PageController', action: 'home', skipAssets: true }
// (removing the warning also removes this documentation line)
Defensive patterns

Strategy: validation

Validate before calling

// Same guard as error 127; fixing skipAssets removes this doc line too
if (/\*\/?$/.test(address) && target.skipAssets === undefined) {
  target.skipAssets = true;
}

Prevention

When it happens

Trigger: Same as error 127: binding a wildcard/get-style route whose target lacks an explicit `skipAssets` value.

Common situations: Seen in lift output for every wildcard route in routes.js missing skipAssets; harmless but noisy when many such routes exist.

Related errors


AI-assisted analysis of balderdashy/sails@7b76422cc2 (2026-09-01). Data as JSON: /api/errors/ac225126f254b5c0. Report an issue: GitHub.