You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
params = param_type === Nothing ?nothing: param_type <:NamedTuple?convert(param_type,(;(Symbol(i[1])=>i[2] for i in msg["params"])...)) :param_type(msg["params"])
error_msg ="The handler for the '$method_name' request returned a value of type $(typeof(res)), which is not a valid return type according to the request definition."
request2_type => (conn, params) ->34# The request type requires a `String` return, so this tests whether we get an error.
204
+
end
205
+
206
+
server_task2 =@asynctry
207
+
server =listen(global_socket_name2)
208
+
notify(server_is_up)
209
+
sock =accept(server)
210
+
global conn = JSONRPC.JSONRPCEndpoint(sock, sock)
211
+
global msg_dispatcher = JSONRPC.MsgDispatcher()
212
+
213
+
run(conn)
214
+
215
+
for msg in conn
216
+
@test_throwsErrorException("The handler for the 'request2' request returned a value of type $Int, which is not a valid return type according to the request definition.") my_dispatcher2(conn, msg)
@test_throws JSONRPC.JSONRPCError(-32603, "The handler for the 'request2' request returned a value of type $Int, which is not a valid return type according to the request definition.", nothing) JSONRPC.send(conn2, request2_type, nothing)
0 commit comments