Handle Ajax errors and provide a message to the user.