Error while refreshing the window.
I read here that as it would not be clear who is refreshing the window, it's grammatically incorrect, but I'm not sure. Should it be
Error at refreshing the window.
or
Error while the window was being refresh.
or other option?