[Meteor 3] Uncaught Promise Rejection when throwing stub error
jamauro opened this issue · comments
jamauro commented
When throwing a stub error with Meteor.applyAsync
, I see 3 Unhandled Promise Rejection
errors in the browser console.
This is with 3.0-beta.0
// client
const promise = Meteor.applyAsync('test', ['thing'], {returnStubValue: true, throwStubExceptions: true});
promise.stubPromise.catch(e => console.error('stubPromise error', e))
promise.catch(e => console.error('serverPromise error', e))
// isomorphic method
Meteor.methods({
'test': async function() {
if (Meteor.isClient) {
throw new Meteor.Error('negative')
}
return;
}
});