-
Notifications
You must be signed in to change notification settings - Fork 13
support grpc endpoint #59
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: JayiceZ <1185430411@qq.com>
Signed-off-by: JayiceZ <1185430411@qq.com>
|
||
_, err = bb.ReadFrom(r.Body) | ||
if err != nil { | ||
WriteErrorGrpcResponse(w, GrpcInvalidArgument, fmt.Sprintf("cannot read request body: %s", err)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refer https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
I think we should use GrpcInternal
.
|
||
err = checkProtobufRequest(bb.B) | ||
if err != nil { | ||
WriteErrorGrpcResponse(w, GrpcInvalidArgument, err.Error()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, the docs said that we should return GrpcInternal
when Error parsing request proto
Describe Your Changes
Please provide a brief description of the changes you made. Be as specific as possible to help others understand the purpose and impact of your modifications.
Checklist
The following checks are mandatory: