I think we should revisit this code and match on the JSON RPC method first then perform the correct decoding as there are body types like "SendMessageRequest" which are reused for different methods.
For example:
def _process_request(self, request: JSONRPC20Request):
match request.method:
case "SendMessage":
input: SendMessageRequest = ParseDict(request.params, SendMessageRequest())
result = await self.handler.on_send_message(input)
case "CancelTask":
input: CancelTaskRequest = ParseDict(request.params, CancelTaskRequest())
...
...
Originally posted by @Tehsmash in #572