Added ajax options when triggering error.

I added ajax options when triggering error to be able to treat this
options and resend a request changing some of them.