theapp.js: add ajax fail callback