Skip to content

[3.0]Fixed grpc server StatsCode and serializeMessage#5036

Merged
limingxinleo merged 11 commits intohyperf:masterfrom
kids-return:3.0-grpc-server
Aug 19, 2022
Merged

[3.0]Fixed grpc server StatsCode and serializeMessage#5036
limingxinleo merged 11 commits intohyperf:masterfrom
kids-return:3.0-grpc-server

Conversation

@kids-return
Copy link
Contributor

@kids-return kids-return changed the title Fixed gRPC Server [3.0]Fixed gRPC Server Aug 19, 2022
@kids-return
Copy link
Contributor Author

@PandaLIU-1111 @huangzhhui

@kids-return
Copy link
Contributor Author

kids-return commented Aug 19, 2022

throw new GrpcException('test', 10);
http code 200
golang gRPC Client

rpc error: code = Aborted desc = test

http code 400
golang gRPC Client

rpc error: code = Internal desc = unexpected HTTP status code received from server: 400 (Bad Request)

http code 500
golang gRPC Client

rpc error: code = Unknown desc = unexpected HTTP status code received from server: 500 (Internal Server Error)

@kids-return
Copy link
Contributor Author

http 与 gRPC 的状态转换 应该在客户端处理
在遇到非 200的http状态码时 才进行尝试转换为 gRPC 的异常

@kids-return
Copy link
Contributor Author

客户端的异常处理我也在尝试修到另一个 PR 里

PandaLIU-1111
PandaLIU-1111 previously approved these changes Aug 19, 2022
@PandaLIU-1111 PandaLIU-1111 changed the title [3.0]Fixed gRPC Server [3.0]Fixed grpc server StatsCode and serializeMessage Aug 19, 2022
Copy link
Member

@huangdijia huangdijia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

怎么还改动到容器了

@limingxinleo limingxinleo changed the base branch from 3.0 to master August 19, 2022 14:18
@limingxinleo limingxinleo merged commit d3f7d1e into hyperf:master Aug 19, 2022
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

Successfully merging this pull request may close these issues.

4 participants