set status property on errors during AJAX requests more intelligently