If an ajax error occurs and we have an onFailure handler defined, call it
Merge pull request #651 from wwadge/master

If an ajax error occurs and we have an onFailure handler defined, call it