Also log sanitized error in server logs (which gets sent to client) on match errors

This commit is contained in:
Avital Oliver
2014-07-30 16:21:13 -07:00
parent 135dd942aa
commit d8e28eb74b

View File

@@ -1458,8 +1458,11 @@ var wrapInternalException = function (exception, context) {
// tests can set the 'expected' flag on an exception so it won't go to the
// server log
if (!exception.expected)
if (!exception.expected) {
Meteor._debug("Exception " + context, exception.stack);
Meteor._debug("Sanitized and reported to the client as:", exception.sanitizedError.message);
Meteor._debug();
}
// Did the error contain more details that could have been useful if caught in
// server code (or if thrown from non-client-originated code), but also