spumko/hapi — pull request #1005 by philbooth (2013-08-05 17:51:56+00:00)
Title: Improve server constructor argument validation error reporting

Again, not sure if you guys will appreciate this change or not, but I found the error message a bit cryptic when I accidentally passed the wrong type in to the server constructor (port was a string).

Possibly it is just because I'm unfamiliar with that idiom of argument parsing (presumably it is to allow arguments in any order?), but I reckon I'd have diagnosed the problem more easily if the error message contained the values that were in error. Just thought I'd offer this change in case it saves someone else time in the future, although I totally understand if you don't want to go down the route of optimising error messages for user stupidity! :)