{"record":{"id":"8ced4e4797d2546d","repo":"paperclipai/paperclip","slug":"parse-error","errorCode":"PARSE_ERROR","errorMessage":"Empty message","messagePattern":"Empty message","errorType":"exception","errorClass":"JsonRpcParseError","httpStatus":null,"severity":"error","filePath":"packages/plugins/sdk/src/protocol.ts","lineNumber":2452,"sourceCode":"    id,\n    error: data !== undefined\n      ? { code, message, data }\n      : { code, message } as JsonRpcError<TData>,\n  };\n  return response;\n}\n\n/**\n * Create a JSON-RPC 2.0 notification (fire-and-forget, no response expected).\n *\n * @param method - The notification method name\n * @param params - Structured parameters\n */\nexport function createNotification<TMethod extends string>(\n  method: TMethod,\n  params: unknown,\n): JsonRpcNotification<TMethod> {\n  return {\n    jsonrpc: JSONRPC_VERSION,\n    method,\n    params,\n  };\n}\n\n// ---------------------------------------------------------------------------\n// Type Guards\n// ---------------------------------------------------------------------------\n\n/**\n * Check whether a value is a well-formed JSON-RPC 2.0 request.\n *\n * A request has `jsonrpc: \"2.0\"`, a string `method`, and an `id`.\n */\nexport function isJsonRpcRequest(value: unknown): value is JsonRpcRequest {\n  if (typeof value !== \"object\" || value === null) return false;\n  const obj = value as Record<string, unknown>;","sourceCodeStart":2434,"sourceCodeEnd":2470,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/plugins/sdk/src/protocol.ts#L2434-L2470","documentation":"Generic input guard in parseMessage: after trimming, the JSON-RPC line is empty (zero length). The plugin SDK's newline-delimited JSON-RPC parser requires each line to carry one message, so an empty line — heartbeat, blank keepalive, or framing bug — is rejected as invalid input before JSON.parse runs.","triggerScenarios":"Thrown at packages/plugins/sdk/src/protocol.ts:2322 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send a non-empty message."],"exampleFix":null,"handlingStrategy":"validation","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"}