public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $details = new Inspector($this->e);

        $contents = json_encode([
            'type' => get_class($details->inner()),
            'message' => $details->inner()->getMessage(),
            'context' => [
                'type' => get_class($details->current()),
                'message' => $details->current()->getMessage(),
            ],
            'trace' => $details->inner()->getTrace(),
        ]);

        $response = $this->factory
            ->createResponse(500)
            ->withHeader('Content-type', 'application/json');

        $response->getBody()->write($contents);

        return $response;
    }