googleworkspace/cli · error · GwsError

Failed to serialize seed payload for idempotency key: {e}

Error message

Failed to serialize seed payload for idempotency key: {e}

What it means

Before creating Meet conference data, the helper builds a deterministic UUIDv5 idempotency key from event fields (summary, times, attendees) and serializes that seed payload with serde_json::to_vec. The payload is a serde_json::Value built only from strings and arrays, so serialization is effectively infallible — this branch is defensive scaffolding that would only fire on allocator failure or a non-string map key introduced by a future edit.

Source

Thrown at crates/google-workspace-cli/src/helpers/calendar.rs:499

            map.insert("end".to_string(), json!(end));
            if let Some(loc) = location {
                map.insert("location".to_string(), json!(loc));
            }
            if let Some(desc) = description {
                map.insert("description".to_string(), json!(desc));
            }
            if !attendees.is_empty() {
                let attendees_list_for_seed: Vec<_> = attendees
                    .iter()
                    .map(|email| json!({ "email": email }))
                    .collect();
                map.insert("attendees".to_string(), json!(attendees_list_for_seed));
            }
            serde_json::Value::Object(map)
        };

        let seed_data = serde_json::to_vec(&seed_payload).map_err(|e| {
            GwsError::Other(anyhow::anyhow!(
                "Failed to serialize seed payload for idempotency key: {e}"
            ))
        })?;
        let request_id = uuid::Uuid::new_v5(&namespace, &seed_data).to_string();

        body["conferenceData"] = json!({
            "createRequest": {
                "requestId": request_id,
                "conferenceSolutionKey": { "type": "hangoutsMeet" }
            }
        });
        params["conferenceDataVersion"] = json!(1);
    }
    let body_str = body.to_string();
    let scopes: Vec<String> = insert_method.scopes.iter().map(|s| s.to_string()).collect();

    // events.insert requires 'calendarId' path parameter
    let params_str = params.to_string();

View on GitHub (pinned to a3768d0e82)

Solutions

  1. If hit with an unmodified build, check system memory and report a bug with the event parameters
Defensive patterns

Strategy: try-catch

Prevention

When it happens

Trigger: Out-of-memory during serialization; future code changes inserting a non-serializable value into the seed map. Not reachable via any user input.

Common situations: Essentially never observed; present to satisfy exhaustive error handling around serde_json.

Related errors


AI-assisted analysis of googleworkspace/cli@a3768d0e82 (2026-08-16). Data as JSON: /api/errors/539ae22868eda531. Report an issue: GitHub.