When a validation error occurs during client simulation (after calling
Meteor.call()), there are two issues I observed:
- A console error is reported in the browser:
Exception while simulating the effect of invoking 'business.add' Error: Please input the name of your business at modules.js?hash=f9961a6b698e892abfa59a00f79ebf36f4f75ded:3429 at Array.forEach (<anonymous>) at SimpleSchema.validate (modules.js?hash=f9961a6b698e892abfa59a00f79ebf36f4f75ded:3417) at MethodInvocation.<anonymous> (modules.js?hash=f9961a6b698e892abfa59a00f79ebf36f4f75ded:3492) at ValidatedMethod._execute (validated-method.js:86) at MethodInvocation.business.add (validated-method.js:54) at DDP._CurrentMethodInvocation.withValue (livedata_connection.js:664) at Meteor.EnvironmentVariable.EVp.withValue (meteor.js?hash=0504f43f667698535416b00eb44eb6f53161cb63:1196) at Connection.apply (livedata_connection.js:653) at Connection.call (livedata_connection.js:556)
- The method call continue to execute in the server. Supposedly, validated-method won’t continue the call in the server side because an error happened during the client simulation.
I think the error is with #1 above wherein instead of returning the error, an exception is being logged. Any idea on how to solve this?