You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where mySchema.data is undefined. This threw the following:
[Error: Invalid schema content: ]
Error: Invalid schema content:
at Object.exports.assert (mycode/node_modules/hapi/node_modules/hoek/lib/index.js:731:11)
at Object.exports.schema (mycode/node_modules/hapi/node_modules/joi/lib/cast.js:66:10)
at internals.Object.keys (mycode/node_modules/hapi/node_modules/joi/lib/object.js:282:25)
at Object.exports.schema (mycode/node_modules/hapi/node_modules/joi/lib/cast.js:47:33)
at root.compile (mycode/node_modules/hapi/node_modules/joi/lib/index.js:113:21)
at Object.internals.compileRule (mycode/node_modules/hapi/lib/route.js:256:88)
at mycode/node_modules/hapi/lib/route.js:98:38
at Array.forEach (native)
at new module.exports.internals.Route (mycode/node_modules/hapi/lib/route.js:96:47)
at internals.Connection._addRoute (mycode/node_modules/hapi/lib/connection.js:361:17)
Which does not provide much that's actionable. Ideally there would be some sort of reference to the data field and potentially the fact that this is the payload structure (although that would likely need to be in hapi vs. joi, hapi hapi joi joi).
The text was updated successfully, but these errors were encountered:
Hapi should report that it's payload. I'll think about it but I suspect it would be an awful amount of code for very little gain (because this rarely happens).
That it rarely happens if more of a reason to include specific information in the error message because people do not know how to deal with it when it happens? It's unlikely that you'd catch every case that an init error can occur, but if there are known cases that require the user to hack on files in node_modules to figure out what exactly broke, we should fix them.
Can be as simple as adding try/catch combos to extend the error? Ex:
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
lockbot
locked as resolved and limited conversation to collaborators
Jan 9, 2020
This issue was closed.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Accidentally did something like the following:
Where
mySchema.data
is undefined. This threw the following:Which does not provide much that's actionable. Ideally there would be some sort of reference to the
data
field and potentially the fact that this is the payload structure (although that would likely need to be in hapi vs. joi, hapi hapi joi joi).The text was updated successfully, but these errors were encountered: