Function
errorResponse
(
id: JsonRpcRequest["id"] | null,
code: number,
message: string,
data?: unknown,
)
Source from the content-addressed store, hash-verified
| 138 | } |
| 139 | |
| 140 | function errorResponse( |
| 141 | id: JsonRpcRequest["id"] | null, |
| 142 | code: number, |
| 143 | message: string, |
| 144 | data?: unknown, |
| 145 | ): JsonRpcFailure { |
| 146 | return { |
| 147 | jsonrpc: "2.0", |
| 148 | id: id ?? null, |
| 149 | error: { code, message, data: data as any }, |
| 150 | }; |
| 151 | } |
| 152 | |
| 153 | async function handleLine(line: string): Promise<void> { |
| 154 | if (closed) return; |
Tested by
no test coverage detected