{"record":{"id":"b0921f0dd0311d5d","repo":"paperclipai/paperclip","slug":"adapterconfig-must-be-an-object","errorCode":null,"errorMessage":"adapterConfig must be an object","messagePattern":"adapterConfig must be an object","errorType":"http","errorClass":null,"httpStatus":422,"severity":"error","filePath":"server/src/routes/agents.ts","lineNumber":3702,"sourceCode":"\n      if (sourceIssueIds.length > 0) {\n        await issueApprovalsSvc.linkManyForApproval(approval.id, sourceIssueIds, {\n          agentId: actor.actorType === \"agent\" ? actor.actorId : null,\n          userId: actor.actorType === \"user\" ? actor.actorId : null,\n        });\n      }\n    }\n\n    await logActivity(db, {\n      companyId,\n      actorType: actor.actorType,\n      actorId: actor.actorId,\n      agentId: actor.agentId,\n      runId: actor.runId,\n      agentApiKeyId: actor.agentApiKeyId,\n      action: \"agent.hire_created\",\n      entityType: \"agent\",\n      entityId: agent.id,\n      details: {\n        name: agent.name,\n        role: agent.role,\n        requiresApproval,\n        approvalId: approval?.id ?? null,\n        issueIds: sourceIssueIds,\n        desiredSkills: desiredSkillAssignment.desiredSkills,\n      },\n    });\n    const telemetryClient = getTelemetryClient();\n    if (telemetryClient) {\n      trackAgentCreated(telemetryClient, { agentRole: agent.role, agentId: agent.id });\n    }\n\n    await applyDefaultAgentTaskAssignGrant(\n      companyId,\n      agent.id,\n      actor.actorType === \"user\" ? actor.actorId : null,","sourceCodeStart":3684,"sourceCodeEnd":3720,"githubUrl":"https://github.com/paperclipai/paperclip/blob/5716fe907e596ce73501408fc6efdb19fb61edf2/server/src/routes/agents.ts#L3684-L3720","documentation":"Shape guard on PATCH /agents/:id: the request supplies an 'adapterConfig' that is not a plain object (null, array, or scalar). Adapter config must be a map of option keys to values, so the update aborts with 400 before merging.","triggerScenarios":"Thrown at server/src/routes/agents.ts:3769 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send adapterConfig as a JSON object in the request body."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5716fe907e596ce73501408fc6efdb19fb61edf2","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}