Commit graph

6 commits

Author SHA1 Message Date
Daniel Liu
33b40aef2c
rpc: use reflect.TypeFor #32316 (#1410)
Co-authored-by: cui <cuiweixie@gmail.com>
2025-09-03 15:42:31 +08:00
Daniel Liu
a4aebd5d88
rpc: fix typos (#1011) 2025-04-29 17:07:10 +08:00
Daniel Liu
80abc58f25
all: replace some cases of strings.SplitN with strings.Cut #28446 (#1007)
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
2025-04-28 18:07:59 +08:00
Daniel Liu
5af41b62a7
rpc: more accurate checking of handler method signatures #27287 (#990)
This changes the RPC server to ignore methods using *context.Context as parameter
and *error as return value type. Methods with such types would crash the server when
called.

Co-authored-by: Stephen Guo <stephen.fire@gmail.com>
2025-04-28 10:45:50 +08:00
Daniel Liu
02eb1d5375
rpc: improve error codes for internal server errors #25678 (#974)
This changes the error code returned by the RPC server in certain situations:

- handler panic: code -32603
- result marshaling error: code -32603
- attempt to subscribe via HTTP: code -32001

In all of the above cases, the server previously returned the default error
code -32000.

Co-authored-by: Nicholas <nicholas.zhaoyu@gmail.com>
Co-authored-by: Nicholas Zhao <nicholas.zhao@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-04-24 19:03:29 +08:00
Banana-J
39f6e6ee56
upgrade the websocket in xdpos (#349) 2023-11-06 15:37:14 +11:00