Error Tracking

To track errors, we use onBug():

import { onBug } from 'telefunc'

onBug(err => {
  // ...

Allowing us, for example, to install the tracker code of a tracking service (Sentry, Bugsnag, Rollbar, ...).

onBug() is called:

  • When Telefunc throws an error (Telefunc has a bug).
  • When one of your telefunction throws an error (your telefunction has a bug).

Note that throw Abort() won't trigger onBug(): it is expected that a third-party may make a wrongful call that leads to a throw Abort(). In other words: throw Abort() is expected and isn't a bug.