It could be a simple reason like incorrect date/time on the device. Or a temporary Internet outage. Or signing in to Jolla account is not valid (somehow). Installing any app from Jolla Store would test all this (but not the date/time issue).
There must be other reasons, too.
After a failing attempt to update the OS, the file /var/log/systemupdate.log and /var/log/zypp/history might reveal the culprit.
In the last 2 years and 3 SFOS phones in my family I really often hat the same problem. But updating by CLI, as @kaari mentioned in post #2 always worked fine.
Don’t forget to have the last 3.4 version on the phone before updating to 4.0. Please don’t skip this!
After updating to 4.0 you can update to 4.1 in a second step.
I shut down and restarted wlan and after some toying with settings, appeared the note of version 4.1.0.24. The install was straightforward.
I follow Jolla Blog and Sailfish OS forum, otherwise I woudn’t know anything about the update.