mirror of
https://github.com/codex-storage/nim-json-rpc.git
synced 2025-02-23 08:28:23 +00:00
Use proper error const
This commit is contained in:
parent
66f9c63f01
commit
a0c1b7db44
@ -40,7 +40,7 @@ proc processClient(server: RpcServer, client: AsyncSocket) {.async.} =
|
||||
let err = future.readError.RpcProcError
|
||||
await client.sendError(err.code, err.msg, err.data)
|
||||
else:
|
||||
await client.sendError(-32000, "Error", %getCurrentExceptionMsg())
|
||||
await client.sendError(SERVER_ERROR, "Error", %getCurrentExceptionMsg())
|
||||
|
||||
proc serve*(server: RpcServer) {.async.} =
|
||||
server.socket.bindAddr(server.port, server.address)
|
||||
|
Loading…
x
Reference in New Issue
Block a user