Was just writing to my tech team on some enhancements where user experience is important. This line came up!
When a user is doing something on your product, SaaS platform or a website - let him know what's the next steps are. If he's uploading a file, let him know that he doesn't have to wait for it to upload. Instead, he will get an email as soon as he's done.
So, set an expectation on what's the outcome and not show some errors after the process (or customer's patience) times out.