fn finish_response<T: Serialize>( label: &str, ret_type: i32, ret_msg: Option<&str>, err_code: Option<i32>, response: &T, ) -> Result<String>