tinyhumansai/openhuman · error

Core rejected the meet_set_event_policy request.

Error message

Core rejected the meet_set_event_policy request.

What it means

The openhuman.meet_set_event_policy RPC — persisting a per-event auto/ask/skip join-policy override — answered ok:false, meaning the write failed core-side. Per the doc, resolution order on the Rust side is per-event > per-platform > global, so a failed per-event write leaves the effective policy resolved from the coarser levels.

Solutions

  1. Confirm the calendar event ID is current (re-list upcoming meetings) and the calendar is still connected
  2. Check core logs for the persistence error on the policy write path
  3. Type the policy parameter as the literal union so invalid values fail at compile time
  4. Optimistically update the toggle but revert on catch and re-throw to a toast

Example fix

// before
await setEventPolicy(eventId, policy as string);

// after
type JoinPolicy = 'auto' | 'ask' | 'skip';
await setEventPolicy(eventId, policy satisfies JoinPolicy);
Defensive patterns

Strategy: try-catch

Validate before calling

type JoinPolicy = 'auto' | 'ask' | 'skip';
const POLICIES: readonly JoinPolicy[] = ['auto', 'ask', 'skip'];
function isJoinPolicy(v: unknown): v is JoinPolicy {
  return typeof v === 'string' && (POLICIES as readonly string[]).includes(v);
}

Type guard

function isSetPolicyRejected(err: unknown): boolean {
  return err instanceof Error && err.message.includes('meet_set_event_policy');
}

Try / catch

setOptimisticPolicy(eventId, policy);
try {
  await setEventPolicy(eventId, policy);
} catch (err) {
  revertOptimisticPolicy(eventId); // effective policy falls back to per-platform/global
  toast('Could not save join policy for this event.');
}

Prevention

When it happens

Trigger: setEventPolicy(calendarEventId, policy) with an event ID the core cannot persist against (unknown/foreign calendar); the policy store (workspace persistence) failing to write; a policy value outside 'auto'|'ask'|'skip' reaching the wire (type-cast callers); calendar disconnected so event resolution fails.

Common situations: Toggle in the upcoming-meetings list flipped before calendar sync completed; corrupted policy store; calendar event deleted server-side between list render and policy save.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/cda5ccb7b4296e74. Report an issue: GitHub.

Appendix: source

Thrown at app/src/services/meetCallService.ts:440

interface CoreGetEventPoliciesResponse {
  ok: boolean;
  policies: Record<string, string>;
}

/**
 * Persist a per-event join-policy override for a specific calendar event.
 * Resolution order (Rust side): per-event > per-platform > global.
 */
export async function setEventPolicy(
  calendarEventId: string,
  policy: 'auto' | 'ask' | 'skip'
): Promise<void> {
  const result = await callCoreRpc<CoreSetEventPolicyResponse>({
    method: 'openhuman.meet_set_event_policy',
    params: { calendar_event_id: calendarEventId, policy },
  });
  if (!result?.ok) {
    throw new Error('Core rejected the meet_set_event_policy request.');
  }
}

/**
 * Batch-fetch per-event join-policy overrides for the given calendar event IDs.
 * Only IDs that have an explicit override are present in the returned map.
 */
export async function getEventPolicies(
  calendarEventIds: string[]
): Promise<Record<string, string>> {
  if (calendarEventIds.length === 0) return {};
  const result = await callCoreRpc<CoreGetEventPoliciesResponse>({
    method: 'openhuman.meet_get_event_policies',
    params: { calendar_event_ids: calendarEventIds },
  });
  if (!result?.ok) {
    throw new Error('Core rejected the meet_get_event_policies request.');
  }

View on GitHub (pinned to 7491200858)