From d5476e839b800a2f56c4cd9c35568f6c593c10f2 Mon Sep 17 00:00:00 2001 From: caleb Date: Tue, 19 Nov 2024 10:27:28 -0500 Subject: [PATCH] params property is optional in JSON-RPC spec --- src/middlewared/middlewared/api/base/server/ws_handler/rpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middlewared/middlewared/api/base/server/ws_handler/rpc.py b/src/middlewared/middlewared/api/base/server/ws_handler/rpc.py index 4ccb5cde3759..d89f1e721faa 100644 --- a/src/middlewared/middlewared/api/base/server/ws_handler/rpc.py +++ b/src/middlewared/middlewared/api/base/server/ws_handler/rpc.py @@ -274,7 +274,7 @@ async def process_message(self, app: RpcWebSocketApp, message: Any): app.send_error(id_, JSONRPCError.METHOD_NOT_FOUND.value, "Method does not exist") return - asyncio.ensure_future(self.process_method_call(app, id_, method, message["params"])) + asyncio.ensure_future(self.process_method_call(app, id_, method, message.get("params", []))) async def process_method_call(self, app: RpcWebSocketApp, id_: Any, method: Method, params: list): try: