Added errors if invalid request to button function.