codeforamerica/honolulu_answers — pull request #27 by hale (2013-09-03 15:08:39+00:00)
Title: [#9] Fallback to no related articles if #search throws exception

Trello: https://trello.com/c/6E2j3yVC

--

This adds a new ErrorService object, which is used to report exceptions. ErrorService#report(Exception)

When in development, ErrorService will simply log the exception. When in staging or production, the exception will be reported to Rollbar, our exception handling service.

### Why not schedule the job directly?

Calls to Delayed::Job are now isolated to one class, so if we use some other async. mechanism or the DJ API changes it's only called in one place.

### Why not call Rollbar directly?

Calling Rollbar in the same thread as the request response would be a Bad Idea™, since it would tie our level of service to Rollbar's. Also, we might swap Rollbar for something else.