We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
jsonrpc_handler
Command
1 parent 7f76f1b commit 7181b62Copy full SHA for 7181b62
lf_toolkit/io/rpc_handler.py
@@ -4,6 +4,7 @@
4
from jsonrpcserver import Success
5
from jsonrpcserver import async_dispatch
6
7
+from ..shared import Command
8
from .handler import Handler
9
10
@@ -23,10 +24,10 @@ async def dispatch(self, req: str) -> str:
23
24
)
25
26
-def jsonrpc_handler(handler: Handler, name: str):
27
+def jsonrpc_handler(handler: Handler, name: Command):
28
async def wrapped(req: dict):
29
try:
- result = await handler.handle(name, req)
30
+ result = await handler.handle(name, {"params": req})
31
return Success(result)
32
except Exception as e:
33
return Error(0, str(e), e)
0 commit comments