Error when importing photos from iCloud to Photos on macOS: "The operation couldn't be completed. (PHAssetExportRequestErrorDomain error 2.)" When I try to download copies of photos and videos in Shared Albums to my own library on my Mac:


Open Photos, then select a Shared Album from the left-hand menu. 
Select the photos or videos. (in my case, I selected 4.900 pictures)
Control-click > Import. 


It takes a while, the progress bar (in form of a disk next to the zoom slider) progresses normally, but when it completes, an error message is displayed and no image is imported in my library: 


  The operation couldn't be completed. (PHAssetExportRequestErrorDomain error 2.)


Version information: 


Photos Version 5.0 (151.19.150)
macOS Catalina 10.15.5
Diagnosis

By trying to import small groups of photos and videos, I found out that there is one video in the middle of my shared album that doesn't display a proper preview, and it can't be imported to my library. Probably this video is corrupted somehow in iCloud. All other photos and videos can be imported properly. 

Work around

Importing all photos and videos before this corrupted video works, and importing all photos and videos after this corrupted video works as well.