class JsonApiFormatter implements HttpFormatter
A formatter to render exceptions as valid {JSON:API} error object.
Methods
ResponseInterface
format(HandledError $error, ServerRequestInterface $request)
<p>Create an HTTP Response to represent the error we are handling.</p>
Details
at
line 26
__construct($includeTrace = false)
at
line 31
ResponseInterface
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>