adding enhanced error messages for ajax