Render twig from CustomErrorRenderer

Hello and thanks for this example, I got to the stage of MyCustomErrorRenderer to display “my awesome format” (under SLIM 4), but trying to use twig in the above code example, the class construct complains (fatal error) __construct(): Argument #1 ($twig) must be of type Slim\Views\Twig, null given. It doesn’t seem to be able to create an instance of Twig inside the class. Do you have any ideas on how to do this under Slim 4 ? Or it might be something else?… Thanks!