protected function makeResponse($response, Exception $exception)
	{
		if (!$response instanceof Response) {
			$response = new Response($response);
		}

		if (!$response->isClientError() && !$response->isServerError() && !$response->isRedirect()) {
			if ($exception instanceof HttpExceptionInterface) {
				$response->setStatusCode($exception->getStatusCode());
				$response->headers->add($exception->getHeaders());
			} else {
				$response->setStatusCode(500);
			}
		}

		return $response;
	}