This works, but we even don't need a pagerfanta in order to test this, so we even didn't need the pagerfanta logic to get the exception. The controller can just throw the exception. This is more a suggestion ;)