async function fetchReportFileUrl()

in vscode/qodana/src/core/report/index.ts [44:63]


async function fetchReportFileUrl(authorized: Authorized, reportId: string, projectId: string): Promise<string | undefined> {
    try {
        let files = await authorized.qodanaCloudUserApi((api) => {
            return api.getReport(reportId, projectId);
        });
        if (files === undefined) {
            return undefined;
        }
        if (files.files.length === 0) {
            vscode.window.showErrorMessage(noFilesFound(reportId, projectId));
            telemetry.errorReceived('#fetchReportFileUrl no files');
            return undefined;
        }
        return files.files[0].url;
    } catch (e) {
        vscode.window.showErrorMessage(failedToObtainReport(reportId, projectId));
        telemetry.errorReceived('#fetchReportFileUrl exception');
        return undefined;
    }
}