paperclipai/paperclip · error · Error
Select a secret first
Error message
Select a secret first
What it means
Selection guard in the Secrets rotateMutation: rotation operates on a specific secret, but selectedSecret is null (no row chosen in the detail pane), so the mutation refuses to run rather than sending a rotation request without a target id.
Source
Thrown at ui/src/pages/Secrets.tsx:1144
providerConfigId: getDefaultProviderConfigId(providerConfigs, createForm.provider),
});
setCreateError(null);
if (result.kind === "company") {
setDetailSelection(result.item.id);
invalidateAll([result.item.id]);
} else {
setDetailSelection(null, result.item.id);
invalidateAll([result.item.id]);
}
},
onError: (error) => {
setCreateError(error);
},
});
const rotateMutation = useMutation({
mutationFn: () => {
if (!selectedSecret) throw new Error("Select a secret first");
if (selectedSecret.managedMode === "external_reference" && rotateMode === "reference") {
return secretsApi.rotate(selectedSecret.id, {
externalRef: rotateExternalRef.trim() || selectedSecret.externalRef || undefined,
providerConfigId: rotateProviderConfigId || null,
});
}
return secretsApi.rotate(selectedSecret.id, {
value: rotateValue,
providerConfigId: rotateProviderConfigId || null,
});
},
onSuccess: (updated) => {
pushToast({ title: "Rotated", body: `${updated.name} → v${updated.latestVersion}`, tone: "success" });
setRotateOpen(false);
setRotateValue("");
setRotateExternalRef("");
setRotateProviderConfigId("");
setRotateError(null);View on GitHub (pinned to a7e689b3c3)
Solutions
- Select a secret from the list before performing this action.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at ui/src/pages/Secrets.tsx:1144 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-18).
Data as JSON: /api/errors/917568835993c4fb.
Report an issue: GitHub.