Iam using delayed job in a rails application. I want to notify an error to airbake whenever a delayed job fails. I checked on [github](https://github.com/collectiveidea/delayed_job) and leant about the **failure** method. 

I want to send the last\_error attribute of failed delayed job to airbrake. Something like this:

```
class ParanoidNewsletterJob < NewsletterJob
   def perform

   end

   def failure
     Airbrake.notify(:message => self.last_error, :error_class => self.handler)
   end
 end

```

But it gives me the following runtime error:

```
undefined method `last_error' for #<struct ParanoidNewsletterJob>

```

**Please help me figure out how I can notify Airbrake the last\_error of a failed delayed\_job.**

Many Thanks!!