> For the complete documentation index, see [llms.txt](https://omalab.gitbook.io/engineeringwiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://omalab.gitbook.io/engineeringwiki/back-end/errors.md).

# Errors

The system uses AirBrake to track and monitor logs. These are setup in the /initailizer for audienti\_config.rb. Right now, we simply duplicate Airbrake's class into one called AppError, and use its methods natively. soon, we will modify the notify to include StatsD logging as well.

```
# Examples of how this works
AppError.notify('App crashed!', {
  anything: 'you',
  wish: 'to add'
})

AppError.notify('App crashed') do |notice|
  notice[:params][:foo] = :bar
end

AppError.notify_sync('App crashed!')
```

First parameter can be

* an Exception (will be sent directly)
* any object that can be converted to String with #to\_s (the information from the object will be used as the message of a RuntimeException that we build internally)
* an Airbrake::Notice
