Add message error in ajax request functions