diff --git a/internal/proxy/task.go b/internal/proxy/task.go index 8e1f0d74008cf63890de9941deae921a765a734c..0000976b7401ab2b1c5f5b5523c4697423924582 100644 --- a/internal/proxy/task.go +++ b/internal/proxy/task.go @@ -1659,14 +1659,22 @@ func (st *searchTask) Execute(ctx context.Context) error { if err != nil { err = st.chMgr.createDQLStream(collID) if err != nil { - st.result.Status.ErrorCode = commonpb.ErrorCode_UnexpectedError - st.result.Status.Reason = err.Error() + st.result = &milvuspb.SearchResults{ + Status: &commonpb.Status{ + ErrorCode: commonpb.ErrorCode_UnexpectedError, + Reason: err.Error(), + }, + } return err } stream, err = st.chMgr.getDQLStream(collID) if err != nil { - st.result.Status.ErrorCode = commonpb.ErrorCode_UnexpectedError - st.result.Status.Reason = err.Error() + st.result = &milvuspb.SearchResults{ + Status: &commonpb.Status{ + ErrorCode: commonpb.ErrorCode_UnexpectedError, + Reason: err.Error(), + }, + } return err } }