aboutsummaryrefslogtreecommitdiff
path: root/rpc/wrapper.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/wrapper.go')
-rw-r--r--rpc/wrapper.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpc/wrapper.go b/rpc/wrapper.go
index 9b4de28..1d6361c 100644
--- a/rpc/wrapper.go
+++ b/rpc/wrapper.go
@@ -28,7 +28,7 @@ func H[RQ any, RS any](handler func(context.Context, *RQ) (RS, error)) Handler {
return func(ctx context.Context, in json.RawMessage) (json.RawMessage, error) {
req := new(RQ)
if err := json.Unmarshal(in, req); err != nil {
- return nil, NewError(ErrCodeParseError)
+ return nil, ErrorFromCode(ErrCodeParseError)
}
resp, err := handler(ctx, req)
if err != nil {