def run
      @error_procs.inject(nil) do |response, error_proc|
        result = begin
          error_proc.call(@exception, @context)
        rescue StandardError => proc_exception
          @exception = proc_exception
          response   = nil # reset response
        end
        response || result
      end
    end
def run
      @error_procs.inject(nil) do |response, error_proc|
        result = begin
          error_proc.call(@exception, @context)
        rescue StandardError => proc_exception
          @exception = proc_exception
          response   = nil # reset response
        end
        response || result
      end
    end
The exception that we are generating a response for can change in the case
 that the configured error proc raises an exception. If this occurs, a
 response will be generated for that exception, instead of the original
 one. This is designed to avoid "hidden" errors happening, this way the
 server will respond and log based on the last exception that occurred.