ccarruitero / makemehapi

Self guided workshops to teach you about hapi.
https://www.npmjs.com/package/makemehapi
Other
480 stars 107 forks source link

Solution for Validation fails -- Joi returning message pair in json. #194

Closed ingusmat closed 7 years ago

ingusmat commented 7 years ago

The solution provided for lesson 9 fails using current versions of Hapi and Joi. When you correctly complete the assignment (or copy/paste from solutions), you get:

1. ACTUAL: "{\"statusCode\":404,\"error\":\"Not Found\",\"message\":\"Not Found\"}" 1. EXPECTED: "{\"statusCode\":404,\"error\":\"Not Found\"}"

Is there a way to validate the validation allowing for that third attribute in the JSON return?

dasdachs commented 7 years ago

I just downgraded both packages. But I hope it gets resolved. Sadly I don't have the nodejs skills to make a decent pull request, other then to update package.json.

ingusmat commented 7 years ago

Thanks @dasdachs. I can confirm the solution now validates!

dasdachs commented 7 years ago

@ingusmat thanks! I finished it 2 days ago. Best of luck!