Delegators AND Factories

Hi,

in case of delegators, can I still use an entry in the factories like:

'factories' => [
   Zend\Stratigility\Middleware\ErrorHandler::class => Container\ErrorHandlerFactory::class
]

I’m trying to follow the instructions described here: https://docs.zendframework.com/zend-expressive/features/error-handling/

But my delegator is not being invoked if I have that entry in the ‘factories’.

I have delegators as follow:

'delegates' => [
            Zend\Stratigility\Middleware\ErrorHandler::class => [
                App\Lib\ErrorHandler\LogginErrorListenerDelegatorFactory::class
            ]
        ]

Try the key delegators instead of delegates. :slight_smile:

At least it was a easy fix. Damn, an hour lost looking into it. Sorry about that :blush: