2

I'm using Ionic 3 and working on developing my app. I added in code for Ionic AppFlow error reporting/monitoring which works great, but I don't want it to run on local so I'm not flooding my email inbox while making a large number of changes.

Ideally, this would only run on production where it matters, since I can see errors in real time using console while developing. How can I disable monitoring on local only?

Citizen
  • 12,430
  • 26
  • 76
  • 117
  • 1
    Good question ... looking for the same thing here. Doesn't seem to be very easy to find. I'm starting to regret using Ionic Pro for deploying updates. So handy, but is causing so many headaches. – TheTC Feb 05 '19 at 21:30

1 Answers1

2

You can do it very easily for Ionic 3 app like so.

handleError(err: any): void {
   IonicPro.monitoring.handleNewError(err); // Remove this if you want to disable Ionic's auto exception handling in development mode.
   this.ionicErrorHandler && this.ionicErrorHandler.handleError(err);
 }

Ref: Ionic Monitor

Sampath
  • 63,341
  • 64
  • 307
  • 441