Promote DownloadError to enum for type-safety