diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.go index 97f1517cd..722f64679 100644 --- a/weed/command/filer_copy.go +++ b/weed/command/filer_copy.go @@ -381,6 +381,9 @@ func (worker *FileCopyWorker) uploadFileAsOne(task FileCopyTask, f *os.File) err if assignResult.Error != "" { return fmt.Errorf("assign volume failure %v: %v", request, assignResult.Error) } + if assignResult.Url == "" { + return fmt.Errorf("assign volume failure %v: %v", request, assignResult) + } return nil }) }) diff --git a/weed/operation/assign_file_id.go b/weed/operation/assign_file_id.go index ffd3e4938..fabc820ff 100644 --- a/weed/operation/assign_file_id.go +++ b/weed/operation/assign_file_id.go @@ -73,6 +73,10 @@ func Assign(masterFn GetMasterFn, grpcDialOption grpc.DialOption, primaryRequest ret.Error = resp.Error ret.Auth = security.EncodedJwt(resp.Auth) + if resp.Error != "" { + return fmt.Errorf("assignRequest: %v", resp.Error) + } + return nil })