switches to wp_send_json_error and adds error messages to base