Fix case when completion request return error.
@@ -93,6 +93,7 @@ class RPC:
if "error" in message: # error
if "id" in message:
mid = message["id"]
+ if mid in self.queue:
del self.queue[mid]
self.onError(message["error"])
elif "result" in message: # result
