{"record":{"id":"2a5ad96cabccbf47","repo":"paperclipai/paperclip","slug":"cannot-remove-built-in-adapter-adaptertype","errorCode":null,"errorMessage":"Cannot remove built-in adapter \"${adapterType}\".","messagePattern":"Cannot remove built-in adapter \"(.+?)\"\\.","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"server/src/routes/adapters.ts","lineNumber":530,"sourceCode":"\n  /**\n   * DELETE /api/adapters/:type\n   *\n   * Unregister an external adapter. Built-in adapters cannot be removed.\n   */\n  router.delete(\"/adapters/:type\", async (req, res) => {\n    assertInstanceAdmin(req);\n    assertAdapterManagementVisible();\n\n    const adapterType = req.params.type;\n\n    if (!adapterType) {\n      res.status(400).json({ error: \"Adapter type is required.\" });\n      return;\n    }\n\n    // Prevent removal of built-in adapters, unless this built-in type is\n    // currently backed by an external adapter plugin override.\n    if (BUILTIN_ADAPTER_TYPES.has(adapterType) && !getAdapterPluginByType(adapterType)) {\n      res.status(403).json({\n        error: `Cannot remove built-in adapter \"${adapterType}\".`,\n      });\n      return;\n    }\n\n    // Check that the adapter exists in the registry\n    const existing = findServerAdapter(adapterType);\n    if (!existing) {\n      res.status(404).json({\n        error: `Adapter \"${adapterType}\" is not registered.`,\n      });\n      return;\n    }\n\n    // Check that it's an external adapter\n    const externalRecord = getAdapterPluginByType(adapterType);","sourceCodeStart":512,"sourceCodeEnd":548,"githubUrl":"https://github.com/paperclipai/paperclip/blob/5716fe907e596ce73501408fc6efdb19fb61edf2/server/src/routes/adapters.ts#L512-L548","documentation":"Protection guard on DELETE /api/adapters/:type: the target type is a builtin adapter with no external plugin override, and builtins cannot be unregistered from the instance, so the route refuses with 403.","triggerScenarios":"Thrown at server/src/routes/adapters.ts:474 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Built-in adapters cannot be removed; disable the adapter instead."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5716fe907e596ce73501408fc6efdb19fb61edf2","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}