There's some duplication here that would be nice to DRY up.  Could add a function that calls the action.

```js
function callAction(action) {
  if (!action) {
    throw new Error("Missing action \"" + route.action + "\" for controller \"" + route.controller + "\"");
  }
  action.call(router, params, router.getRenderCallback(route));
}
```

then use it in both code paths like:

```js
callAction(action);
```