Presenter redirect in onError function of application

I am trying to globaly handle \Nette\ForbiddenRequestException. I need to
make a redirect to Sign:in with a flash message. I tried it in Static function
called from $application->onError, but it throws BadRequestException.

Is it possible to make a redirect in function called from
$application->onError? Do you know a better solution for this?