Skip to content
Snippets Groups Projects
Commit 33f936dd authored by Pawan Rawal's avatar Pawan Rawal
Browse files

fixing nil pointer reference bug in server/main.go

parent 40211ad6
No related branches found
No related tags found
No related merge requests found
......@@ -209,7 +209,8 @@ type server struct{}
// This method is used to execute the query and return the response to the
// client as a protocol buffer message.
func (s *server) Query(ctx context.Context,
req *graph.Request) (resp *graph.Response, err error) {
req *graph.Request) (*graph.Response, error) {
resp := new(graph.Response)
if len(req.Query) == 0 {
glog.Error("While reading query")
return resp, fmt.Errorf("Empty query")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment