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

The metadata of local_request function's return is always nil #1105

Closed
liov opened this issue Jan 2, 2020 · 1 comment
Closed

The metadata of local_request function's return is always nil #1105

liov opened this issue Jan 2, 2020 · 1 comment

Comments

@liov
Copy link

liov commented Jan 2, 2020

func local_request_UserService_Login_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
	var protoReq LoginReq
	var metadata runtime.ServerMetadata

	newReader, berr := utilities.IOReaderFactory(req.Body)
	if berr != nil {
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
	}
	if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
	}

	msg, err := server.Login(ctx, &protoReq)
	return msg, metadata, err

}
@achew22
Copy link
Collaborator

achew22 commented Jan 2, 2020

Unfortunately there is no enough information in this issue to determine what you think is wrong nor how we would go about fixing it. In the future, please use the issue template. If you would like to fill in the issue template and reopen I'm also receptive to that.

@achew22 achew22 closed this as completed Jan 2, 2020
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