spree/spree — pull request #5285 by HoyaBoya (2014-08-29 14:29:30+00:00)
Title: Allow for notification of API errors

Due to the way the rescue handlers are setup for the API, there's no easy way to alert Honeybadger/Airbrake/etc of an error in the API. Instead we have to check the client error JSON and debug from that which is not very ideal expecially if we don't control the client code. This is a simple change to let people decorate in a hook on ```error_during_processing``` so that we can notify on error.

This should help me get rid of one more ```class_eval``` and ```alias_method_chain``` in my application.

Thought this was more flexible then to have but open doing the KISS solution below:

```
if defined?(Honeybadger) then Honeybadger.notify()
```