Fix error code for PostVDS

This commit is contained in:
Kuba Podgórski 2020-08-31 12:16:07 +02:00
parent f7a0e5f536
commit bfff643f34

View file

@ -153,7 +153,7 @@ func (h *GRPCHandler) PostVDS(ctx context.Context, req *pb.PostVDSRequest) (*pb.
opts := pilosa.IndexOptions{Keys: req.Keys, TrackExistence: req.TrackExistence}
_, err := h.api.CreateIndex(ctx, req.Name, opts)
if err != nil {
return nil, err
return nil, errToStatusError(err)
}
return &pb.PostVDSResponse{}, nil
}