( id: RequestId, code: ErrorCode | number, message: string, data?: unknown )
| 95 | } |
| 96 | |
| 97 | function createError( |
| 98 | id: RequestId, |
| 99 | code: ErrorCode | number, |
| 100 | message: string, |
| 101 | data?: unknown |
| 102 | ): JSONRPCError { |
| 103 | return { |
| 104 | jsonrpc: '2.0', |
| 105 | id, |
| 106 | error: { code, message, ...(data !== undefined && { data }) }, |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | function clientCancelledJsonRpcResponse(id: RequestId): NextResponse { |
| 111 | return NextResponse.json( |
no outgoing calls
no test coverage detected