Errors can occur with any download, at any time, and for many reasons. Dnf is smart enough to check the downloaded package and retry it until it gets a download that is acceptable. With delta rpms it will fail over to the full package as said by @vgaetera above.
It uses the same technique to switch to a different mirror site if it cannot get the requested package from the current mirror.