Using router.navigate function when exception

Hi everyone,
I have an issue as below

I want load new page. From View call to Controler by router.navigate menthod. But in case appear exception or any error, I want stay old page and notify error for user.
Please let me know your solution

thanks,

What do you mean exception, more detailed explanation will be good

Hi nolimits4web,
i will describing this problem to you clear
Now, After I using outer.navigate menthod call to Controller, in controller I continue calling api to get data. If api can’t return data as desired. I want stay old page and notify error for user.

Then you have to do the request and do all the checks before you call router.navigate. Otherwise it seems useless