# 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://omalab.gitbook.io/engineeringwiki/back-end/errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
