mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 09:08:43 +08:00
fix: wrong error handling when call importv2 (#41664)
issue: #41654 Signed-off-by: chyezh <chyezh@outlook.com>
This commit is contained in:
parent
0dee3ccfd7
commit
05eb17aebc
@ -1838,6 +1838,10 @@ func (s *Server) ImportV2(ctx context.Context, in *internalpb.ImportRequestInter
|
||||
return importFile
|
||||
})
|
||||
importCollectionInfo, err := s.handler.GetCollection(ctx, in.GetCollectionID())
|
||||
if errors.Is(err, merr.ErrCollectionNotFound) {
|
||||
resp.Status = merr.Status(merr.WrapErrCollectionNotFound(in.GetCollectionID()))
|
||||
return resp, nil
|
||||
}
|
||||
if err != nil {
|
||||
resp.Status = merr.Status(merr.WrapErrImportFailed(fmt.Sprint("get collection failed, err=%w", err)))
|
||||
return resp, nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user