public function handle(Exception $exception, ServerRequestInterface $request, ResponseInterface $response, array $options = [])
    {
        $options += $this->defaultOptions;

        if (!$this->checkException($exception, $options['exceptions'])) {
            throw $exception;
        }

        $url = $this->getUrl($request, $options);

        return $response
                ->withHeader('Location', $url)
                ->withStatus($options['statusCode']);
    }