404 errors in trying to download telegram-desktop

I updated mirrors through Welcome’s menu but mirrorlist showed 2023-06-17 as refresh date, so I then invoked reflector directly (A). However this does not solve the problem in the subject line (B).

Exhibit A:

################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################

# With:       reflector @/etc/xdg/reflector/reflector.conf
# When:       2023-06-17 04:01:41 UTC
# From:       https://archlinux.org/mirrors/status/json/
# Retrieved:  2023-06-17 04:01:28 UTC
# Last Check: 2023-06-17 03:52:57 UTC

Server = https://mirror.theash.xyz/arch/$repo/os/$arch
Server = https://mirror.lty.me/archlinux/$repo/os/$arch
Server = https://mirrors.rit.edu/archlinux/$repo/os/$arch
Server = https://arch.mirror.constant.com/$repo/os/$arch
Server = https://mirror.tmmworkshop.com/archlinux/$repo/os/$arch
$ sudo reflector --country 'United States' --latest 10 --sort rate --save /etc/pacman.d/mirrorlist
[2024-07-26 18:22:49] WARNING: failed to rate rsync download (rsync://arch.mirror.constant.com/archlinux/extra/os/x86_64/extra.db): Download timed out after 5 second(s).
$ sudo cat /etc/pacman.d/mirrorlist
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################

# With:       reflector --country 'United States' --latest 10 --sort rate --save /etc/pacman.d/mirrorlist
# When:       2024-07-26 22:23:05 UTC
# From:       https://archlinux.org/mirrors/status/json/
# Retrieved:  2024-07-26 22:22:38 UTC
# Last Check: 2024-07-26 22:07:05 UTC

Server = https://america.mirror.pkgbuild.com/$repo/os/$arch
Server = https://arch.mirror.constant.com/$repo/os/$arch
Server = https://arlm.tyzoid.com/$repo/os/$arch
Server = http://arch.mirror.constant.com/$repo/os/$arch
Server = http://mirrors.rit.edu/archlinux/$repo/os/$arch
Server = https://us.arch.niranjan.co/$repo/os/$arch
Server = http://us.arch.niranjan.co/$repo/os/$arch
Server = http://mirrors.kernel.org/archlinux/$repo/os/$arch
Server = https://mirrors.kernel.org/archlinux/$repo/os/$arch
Server = rsync://arch.mirror.constant.com/archlinux/$repo/os/$arch

Exhibit B:

$ sudo pacman -S telegram-desktop
resolving dependencies...
looking for conflicting packages...

Package (5)             New Version  Net Change  Download Size

extra/kcoreaddons       6.3.0-1        3.14 MiB               
extra/libdispatch       5.10-1         0.49 MiB               
extra/qt6-wayland       6.7.1-1        7.03 MiB       1.10 MiB
extra/rnnoise           1:0.2-1        1.41 MiB               
extra/telegram-desktop  5.1.5-1       99.26 MiB      35.00 MiB

Total Download Size:    36.10 MiB
Total Installed Size:  111.34 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
 telegram-desktop-5.1.5-1-x86_64.pkg.tar.zst failed to download
 qt6-wayland-6.7.1-1-x86_64.pkg.tar.zst failed to download
 Total (2/2)                                          36.1 MiB  19.6 MiB/s 00:02 [----------------------------------------------] 100%
error: failed retrieving file 'telegram-desktop-5.1.5-1-x86_64.pkg.tar.zst' from america.mirror.pkgbuild.com : The requested URL returned error: 404
error: failed retrieving file 'qt6-wayland-6.7.1-1-x86_64.pkg.tar.zst' from america.mirror.pkgbuild.com : The requested URL returned error: 404
error: failed retrieving file 'telegram-desktop-5.1.5-1-x86_64.pkg.tar.zst' from arch.mirror.constant.com : The requested URL returned error: 404
error: failed retrieving file 'qt6-wayland-6.7.1-1-x86_64.pkg.tar.zst' from arch.mirror.constant.com : The requested URL returned error: 404
error: failed retrieving file 'telegram-desktop-5.1.5-1-x86_64.pkg.tar.zst' from arlm.tyzoid.com : The requested URL returned error: 404
error: failed retrieving file 'qt6-wayland-6.7.1-1-x86_64.pkg.tar.zst' from arlm.tyzoid.com : The requested URL returned error: 404
error: failed retrieving file 'qt6-wayland-6.7.1-1-x86_64.pkg.tar.zst' from arch.mirror.constant.com : The requested URL returned error: 404
warning: too many errors from arch.mirror.constant.com, skipping for the remainder of this transaction
error: failed retrieving file 'telegram-desktop-5.1.5-1-x86_64.pkg.tar.zst' from arch.mirror.constant.com : The requested URL returned error: 404
error: failed retrieving file 'qt6-wayland-6.7.1-1-x86_64.pkg.tar.zst' from mirrors.rit.edu : The requested URL returned error: 404
error: failed retrieving file 'telegram-desktop-5.1.5-1-x86_64.pkg.tar.zst' from mirrors.rit.edu : The requested URL returned error: 404
error: failed retrieving file 'telegram-desktop-5.1.5-1-x86_64.pkg.tar.zst' from us.arch.niranjan.co : The requested URL returned error: 404
error: failed retrieving file 'qt6-wayland-6.7.1-1-x86_64.pkg.tar.zst' from us.arch.niranjan.co : The requested URL returned error: 404
error: failed retrieving file 'qt6-wayland-6.7.1-1-x86_64.pkg.tar.zst' from us.arch.niranjan.co : The requested URL returned error: 404
warning: too many errors from us.arch.niranjan.co, skipping for the remainder of this transaction
error: failed retrieving file 'telegram-desktop-5.1.5-1-x86_64.pkg.tar.zst' from us.arch.niranjan.co : The requested URL returned error: 404
error: failed retrieving file 'qt6-wayland-6.7.1-1-x86_64.pkg.tar.zst' from mirrors.kernel.org : The requested URL returned error: 404
error: failed retrieving file 'telegram-desktop-5.1.5-1-x86_64.pkg.tar.zst' from mirrors.kernel.org : The requested URL returned error: 404
error: failed retrieving file 'telegram-desktop-5.1.5-1-x86_64.pkg.tar.zst' from mirrors.kernel.org : The requested URL returned error: 404
warning: too many errors from mirrors.kernel.org, skipping for the remainder of this transaction
error: failed retrieving file 'qt6-wayland-6.7.1-1-x86_64.pkg.tar.zst' from mirrors.kernel.org : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.

Try this instead:

sudo pacman -Syu telegram-desktop

You need to make sure the system is updated before trying to install software on an Arch-based distro.