Error Tracking

To track bugs, 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 one of your telefunction throws an error that is not Abort(). (In other words, your telefunction has a bug.)
  • When Telefunc throws an error. (In other words, Telefunc has a bug).

throw Abort() does not trigger onBug(). It's expected that throw Abort() may be called (when some third-party erroneously calls a telefunction). In other words, throw Abort() isn't a bug.