Skip to content

Route error message does not include information about which route failed #1208

Description

@kpdecker

When adding this route /r/phoenix/{platform}/index.html, the following error is displayed:

/Users/kpdecker/dev/walmart/us/host/node_modules/hapi/node_modules/hoek/lib/index.js:393
throw new Error(msgs.join(' ') || 'Unknown error');
^
Error: The route path must end with a parameter
at Object.exports.assert (/Users/kpdecker/dev/walmart/us/host/node_modules/hapi/node_modules/hoek/lib/index.js:393:11)
at Object.exports.directoryHandler (/Users/kpdecker/dev/walmart/us/host/node_modules/hapi/lib/files.js:56:11)
at new module.exports.internals.Route (/Users/kpdecker/dev/walmart/us/host/node_modules/hapi/lib/route.js:201:43)
at /Users/kpdecker/dev/walmart/us/host/node_modules/hapi/lib/router.js:89:21
at Array.forEach (native)
at internals.Router.add (/Users/kpdecker/dev/walmart/us/host/node_modules/hapi/lib/router.js:87:13)
at internals.Server._route (/Users/kpdecker/dev/walmart/us/host/node_modules/hapi/lib/server.js:431:18)
at internals.Pack._applySync (/Users/kpdecker/dev/walmart/us/host/node_modules/hapi/lib/pack.js:682:14)
at Object.methods.route (/Users/kpdecker/dev/walmart/us/host/node_modules/hapi/lib/pack.js:221:22)
at exports.register (/Users/kpdecker/dev/walmart/us/scotsman/lib/index.js:22:22)

I'm not sure if this is invalid as it seems like it should be given the route examples. If invalid this should include the name of the route that failed.

Seen in version 1.20.0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug or defect

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions