options->enabledForDisabledShortUrls ? $this->urlResolver->resolvePublicShortUrl($identifier) : $this->urlResolver->resolveEnabledShortUrl($identifier); } catch (ShortUrlNotFoundException $e) { $this->logger->warning('An error occurred while creating QR code. {e}', ['e' => $e]); return $handler->handle($request); } $params = QrCodeParams::fromRequest($request, $this->options); $qrCodeBuilder = Builder::create() ->data($this->stringifier->stringify($shortUrl)) ->size($params->size) ->margin($params->margin) ->writer($params->writer) ->errorCorrectionLevel($params->errorCorrectionLevel) ->roundBlockSizeMode($params->roundBlockSizeMode); return new QrCodeResponse($qrCodeBuilder->build()); } }