class WhoopsFormatter implements HttpFormatter
Handle errors using the Whoops error handler for debugging.
Proper status codes for all known error types are returned. In addition, content negotiation is performed to return proper responses in various environments such as HTML frontends or API backends.
Should only be used in debug mode (because Whoops may expose sensitive data).
format(HandledError $error, ServerRequestInterface $request)
<p>Create an HTTP Response to represent the error we are handling.</p>
<p>This method receives the error that was caught by Flarum's error handling stack, along with the current HTTP request instance. It should return an HTTP response that explains or represents what went wrong.</p>