define([
    'backbone',
    'modules/boilerplate/module',
    'modules/boilerplate/views/home',
], function (Backbone, BoilerplateModule, HomeView) {

    var Router = Backbone.SubRoute.extend({

        routes: {
            "": "home",
            "*404": "404" // catch-all route
        },

        home: function() {
            // var homeView = new HomeView();
            // var renderedView = homeView.render();
            // renderedView.$el.appendTo("body");
        },

        "404": function() {
            console.error("Route 404");
        }

    });

    return Router;

});

define([
    'backbone',
    'modules/boilerplate/module',
    'modules/boilerplate/views/home',
], function (Backbone, BoilerplateModule, HomeView) {

    var Router = Backbone.SubRoute.extend({

        routes: {
            "": "home",
        },

        home: function() {
            // var homeView = new HomeView();
            // var renderedView = homeView.render();
            // renderedView.$el.appendTo("body");
        }

    });

    return Router;

});

--- 
+++ 
@@ -8,12 +8,17 @@
 
         routes: {
             "": "home",
+            "*404": "404" // catch-all route
         },
 
         home: function() {
             // var homeView = new HomeView();
             // var renderedView = homeView.render();
             // renderedView.$el.appendTo("body");
+        },
+
+        "404": function() {
+            console.error("Route 404");
         }
 
     });
Add 404 catch all route to boilerplate module code
