Skip to content

Commit 02f2af9

Browse files
Fix: handle error
1 parent 69297a8 commit 02f2af9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/rpc/post.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ func post[T any](ctx context.Context, api API, req Request, output *Response[T])
4747
return err
4848
}
4949

50-
return output.Error
50+
if output.Error != nil {
51+
return output.Error
52+
}
53+
54+
return nil
5155
}
5256

5357
func closeWithLogError(stream io.ReadCloser) {

0 commit comments

Comments
 (0)