{"record":{"id":"5454ec023124a2eb","repo":"paperclipai/paperclip","slug":"only-remote-http-drafts-can-be-checked-and-activat","errorCode":null,"errorMessage":"Only remote HTTP drafts can be checked and activated from pasted config.","messagePattern":"Only remote HTTP drafts can be checked and activated from pasted config\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ui/src/pages/tools/PasteConfigTab.tsx","lineNumber":114,"sourceCode":" * M8a — \"Paste a config\" tab on the Advanced door (PAP-10862, plan D8).\n *\n * A thin, honest surface over `POST /companies/:id/tools/mcp/import-json`: paste\n * the snippet a README tells you to copy, and we parse it into a friendly\n * preview (humanized field labels, never the raw transport jargon). This is one\n * of the two M8 screens where \"MCP\" vocabulary is allowed (PAP-10827 vocab map).\n */\nexport function PasteConfigTab({ companyId }: { companyId: string }) {\n  const navigate = useNavigate();\n  const [draftText, setDraftText] = useState(\"\");\n  const [preview, setPreview] = useState<McpJsonImportPreview | null>(null);\n  const [connectionNames, setConnectionNames] = useState<Record<string, string>>({});\n  const [credentialValues, setCredentialValues] = useState<Record<string, string>>({});\n  const [connectResult, setConnectResult] = useState<ConnectToolAppResult | null>(null);\n  const [enabled, setEnabled] = useState<Record<string, boolean>>({});\n  const [activatedName, setActivatedName] = useState<string | null>(null);\n  const [oauthPhase, setOAuthPhase] = useState<OAuthConnectPhase>(\"entry\");\n  const [oauthError, setOAuthError] = useState<string | null>(null);\n  const [authorizationHost, setAuthorizationHost] = useState<string | null>(null);\n\n  const importMutation = useMutation({\n    mutationFn: (mcpJson: string) => toolsApi.importMcpJson(companyId, { mcpJson }),\n    onSuccess: (result) => {\n      setPreview(result);\n      setConnectionNames(Object.fromEntries(result.drafts.map((draft) => [draft.name, draft.name])));\n      setConnectResult(null);\n      setActivatedName(null);\n    },\n  });\n\n  const openAuthorizationPage = async (\n    authorizationUrl: string,\n    handoff?: ToolOAuthStartResult[\"handoff\"],\n  ) => {\n    try {\n      const target = await prepareOAuthNavigation({ authorizationUrl, handoff });\n      if (target.kind === \"reauthentication\" && handoff) {","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/ui/src/pages/tools/PasteConfigTab.tsx#L96-L132","documentation":"Error \"Only remote HTTP drafts can be checked and activated from pasted config.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at ui/src/pages/tools/PasteConfigTab.tsx:113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a remote HTTP draft; local drafts cannot be checked and activated from pasted config."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}