Added retry limiti and retry count to ajax error handler