ErrorHandler
in package
implements
MiddlewareInterface
Wraps uncaught exceptions into a JSON response.
Sets HTTP response code to the exception's code if it is within 400-499.
Tags
Interfaces, Classes and Traits
- MiddlewareInterface
Table of Contents
- __construct() : mixed
- process() : ResponseInterface
Methods
__construct()
public
__construct(ResponseFactoryInterface $factory) : mixed
Parameters
- $factory : ResponseFactoryInterface
Return values
mixed —process()
public
process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $handler : RequestHandlerInterface