public function handle(ServerRequestInterface $request, ServerFrame $frame) : ResponseInterface
    {
        $this->errorHandler->setup();

        try {

            return $frame->next($request);

        } catch (\Exception $e) {

            $body = $this->errorHandler->handleException($e);

            return $frame->responseFactory()->create(500, [], $body);
        }
    }
public function handle(ServerRequestInterface $request, ServerFrame $frame) : ResponseInterface
    {
        $this->errorHandler->setup();

        try {

            return $frame->next($request);

        } catch (\Exception $e) {

            $body = $this->errorHandler->handleException($e);

            return $frame->responseFactory()->create(500, [], $body);
        }
    }
@param ServerRequestInterface $request
@param ServerFrame            $frame

@return ResponseInterface