paperclipai/paperclip · error · Error
Select a company before testing plugin configuration.
Error message
Select a company before testing plugin configuration.
What it means
Scope guard in the PluginConfigForm testMutation: testing a plugin configuration executes against a company-scoped test endpoint, but no company is selected, so the test cannot be routed and aborts client-side.
Source
Thrown at ui/src/pages/PluginSettings.tsx:1005
},
onSuccess: () => {
setSaveMessage({ type: "success", text: "Configuration saved." });
setTestResult(null);
if (companyId) {
queryClient.invalidateQueries({ queryKey: queryKeys.plugins.config(pluginId, companyId) });
}
// Clear success message after 3s
setTimeout(() => setSaveMessage(null), 3000);
},
onError: (err: Error) => {
setSaveMessage({ type: "error", text: err.message || "Failed to save configuration." });
},
});
// Test configuration mutation
const testMutation = useMutation({
mutationFn: (configJson: Record<string, unknown>) => {
if (!companyId) throw new Error("Select a company before testing plugin configuration.");
return pluginsApi.testConfig(pluginId, companyId, configJson);
},
onSuccess: (result) => {
if (result.valid) {
setTestResult({ type: "success", text: "Configuration test passed." });
} else {
setTestResult({ type: "error", text: result.message || "Configuration test failed." });
}
},
onError: (err: Error) => {
setTestResult({ type: "error", text: err.message || "Configuration test failed." });
},
});
const handleChange = useCallback((newValues: Record<string, unknown>) => {
setValues(newValues);
// Clear field-level errors as the user types
setErrors({});View on GitHub (pinned to a7e689b3c3)
Solutions
- Select a company from the company picker before testing the plugin configuration.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at ui/src/pages/PluginSettings.tsx:1006 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/24c2c144e070da28.
Report an issue: GitHub.