Closed geerteltink closed 9 years ago
When going through the docs I've come up with a basic configuration. The 404 pages do render as expected but the error/error is empty.
return [ 'dependencies' => [ 'invokables' => [ 'Zend\Expressive\Whoops' => Whoops\Run::class, 'Zend\Expressive\WhoopsPageHandler' => Whoops\Handler\PrettyPageHandler::class, ], 'factories' => [ 'Zend\Expressive\FinalHandler' => Zend\Expressive\Container\WhoopsErrorHandlerFactory::class, ], ], 'whoops' => [ 'json_exceptions' => [ 'display' => true, 'show_trace' => true, 'ajax_only' => true, ], ], 'zend-expressive' => [ 'error_handler' => [ 'template_404' => 'error::404', 'template_error' => 'error::error', ], ], ];
When using the TemplatedErrorHandlerFactory it does work as expected (in combination with Twig):
'Zend\Expressive\FinalHandler' => Zend\Expressive\Container\TemplatedErrorHandlerFactory::class,
This is how the error is triggered inside middleware:
return $next($request, $response, new \Exception('Oh no!'));
Did I miss something in the configuration?
There is no error handler pushed. That's why the pages are empty on errors. I've created a pull request for this: #125
When going through the docs I've come up with a basic configuration. The 404 pages do render as expected but the error/error is empty.
When using the TemplatedErrorHandlerFactory it does work as expected (in combination with Twig):
This is how the error is triggered inside middleware:
Did I miss something in the configuration?