Error templates are rendered when an unhandled exception occurs during the request processing.
When an error occurs and an exception is thrown, Apify displays an error page. The page content depends on the environment. The default error templates are stored in the app/views/error directory:
- app/views/error/development.phtml
- app/views/error/production.phtml
When you customize an error message template, you have access to the following variables:
The Request Object
$request->getMethod() $request->getController() $request->getAction() $request->hasParam('key') $request->getParam('key', 'default_value') $request->getSession()
The Response Object
$response->getCode() $response->getError() $response->getHeaders() $response->getException() $response->getData() $response->toArray()
Comments
Use this form to add corrections, additions and suggestions about the documentation on this page. If you encounter any problems, please use the GitHub issue tracker.