{"record":{"id":"90b3ef467aef07bb","repo":"paperclipai/paperclip","slug":"paperclip-api-request-failed-with-status-status","errorCode":null,"errorMessage":"Paperclip API request failed with status ${status}","messagePattern":"Paperclip API request failed with status (.+?)","errorType":"http","errorClass":"ApiError","httpStatus":null,"severity":"error","filePath":"packages/adapters/hermes/skills/paperclip-task-bridge/paperclip-task.mjs","lineNumber":158,"sourceCode":"    Accept: \"application/json\",\n    ...(options.body !== undefined ? { \"Content-Type\": \"application/json\" } : {}),\n    ...(options.mutating && config.runId ? { \"X-Paperclip-Run-Id\": config.runId } : {}),\n  };\n  const response = await fetch(`${config.apiBaseUrl}${path}`, {\n    method: options.method ?? \"GET\",\n    headers,\n    body: options.body === undefined ? undefined : JSON.stringify(options.body),\n  });\n  const text = await response.text();\n  let body = null;\n  if (text) {\n    try {\n      body = JSON.parse(text);\n    } catch {\n      body = { error: text.slice(0, 1000) };\n    }\n  }\n  if (!response.ok) throw new ApiError(response.status, body);\n  return body;\n}\n\nasync function resolveIdentity(config) {\n  if (config.companyId && config.agentId) {\n    return { companyId: config.companyId, agentId: config.agentId, agent: null };\n  }\n  const agent = await apiFetch(config, \"/agents/me\");\n  const companyId = config.companyId || agent.companyId;\n  const agentId = config.agentId || agent.id;\n  if (!companyId || !agentId) throw new ApiError(500, { error: \"Paperclip identity response did not include companyId and agent id\" });\n  return { companyId, agentId, agent };\n}\n\nfunction issueSummary(issue) {\n  if (!issue || typeof issue !== \"object\") return issue;\n  return {\n    id: issue.id ?? null,","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/adapters/hermes/skills/paperclip-task-bridge/paperclip-task.mjs#L140-L176","documentation":"Error \"Paperclip API request failed with status ${status}\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/adapters/hermes/skills/paperclip-task-bridge/paperclip-task.mjs:158 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the status code: verify the API key and URL on 401/404, fix the payload on 4xx, retry on 5xx."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}