 events =
-  RETRY: 'ajaxRetry.vtex'
-  FAIL_RETRY: 'failAjaxRetry.vtex'
+  AJAX_RETRY: 'ajaxRetry.vtex'
+  AJAX_ERROR: 'ajaxError.vtex'
 
 $.ajaxPrefilter (options, originalOptions, jqXHR) ->
   jqXHR.retry = (opts) ->

        nextRequest()
    else
      if (input.statusText isnt 'abort' or jqXHR.statusText isnt 'abort')
        $(window).trigger(events.FAIL_RETRY, input)
      # no times left, reject our deferred with the current arguments
      output.rejectWith this, arguments
    output

      return

    if times > 1 and (!jqXHR.statusCodes or $.inArray(input.status, jqXHR.statusCodes) > -1)
      $(window).trigger(events.AJAX_RETRY, input)

      # implement Retry-After rfc
      # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.37
      if retryAfter
