Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sofa-rpc json序列化器不支持序列化null对象;反序列化时如果Throwable对象的message为null, 会被当作来成功处理 #1260

Closed
rickey17 opened this issue Oct 20, 2022 · 0 comments

Comments

@rickey17
Copy link
Collaborator

Describe the bug

1、json序列化器不支持序列化null对象,当api返回null是会出现序列化异常
2、json序列化器,在isError处理的时候,当errorMessage为null时,被意外处理成了非error

image

Expected behavior

1、因为我们在进行异步服务的开发,所以在同步的rpc请求阶段,都是返回null对象;真正的业务代码是异步执行,结果单独返回的。
所以希望json序列化器能够支持序列化null对象。
2、我们主要是通过泛化进行调用,采用json序列化,依赖isError的标记处理逻辑;所以希望支持当业务明确抛出异常,不管异常类型中的errorMessage是否为空,都能识别为异常

Actual behavior

Steps to reproduce

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

  • SOFARPC version: 5.9.0-SNAPSHOT
  • JVM version: 1.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants