I have a website where users can work on projects and their work gets automatically saved to my database. Every couple seconds on my site an ajax (post) call occurs (usually in jquery) to check permissions and what not. 

With one section of code is there any way so check if **any** of the ajax calls on your page fail. I don't want to have to go to every individual call and add a block of code to the end.

Basically this is so I can alert the user if they have lost connection or if something is going wrong.