Call method with callPromise with applyOptions?

How can we use method with callPromise applyOption not to retry

applyOptions: {
    noRetry: true, // <-- Tell Meteor not to retry

this is method on server

export const journal = new ValidatedMethod({
  name: 'app.journa',
  mixins: [CallPromiseMixin],
  applyOptions: {
    noRetry: true, // <-- Tell Meteor not to retry
  validate: null,
  async run() {
   // code here

this is client call

    .then(res => {      
      console.log('res', res)
    }).catch(err => {
      console.log('err', err)

Can I callPromise and applyOptions: {
noRetry: true,} does it work?, if not, what should we use?

what is your ValidatedMethod package?

I used this mdg:validated-method

Then I don’t think callPromise() method is available.

But you can use Meteor.callAsync to call that method. In your example, you can call Meteor.callAsync('app.journa')

1 Like

@minhna Thank I will try. So I need to change all callPromise to Meteor.callAsync(‘app.journa’) all call client

This call method use meteor 2.8 up Meteor.callAsync

I don’t know where does the callPromise come from. I don’t see it in the package, the package looks like outdate. Maybe you have the updated version.

@minhna I’m not sure about this issue talk Canceling server side methods after app crash - #3 by ehm