From e743b42840e4b45dcffbff02fe8a8f3954027850 Mon Sep 17 00:00:00 2001 From: Nulo Date: Tue, 28 Nov 2023 20:53:38 -0300 Subject: [PATCH] arreglar reporte de errores --- download_json.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download_json.js b/download_json.js index 03bfaba..e79056a 100644 --- a/download_json.js +++ b/download_json.js @@ -118,7 +118,7 @@ async function downloadFromData(jsonUrlString) { try { await downloadDistWithRetries(job); } catch (error) { - await errorFile.write(JSON.stringify(job, encodeError(error)) + "\n"); + errorFile.write(JSON.stringify(encodeError(job, error)) + "\n"); nErrors++; } finally { nFinished++; @@ -265,7 +265,7 @@ function wait(ms) { */ function encodeError(job, error) { const always = { - url: job.url?.toString || job.dist.downloadURL, + url: job.url?.toString() || job.dist.downloadURL, datasetIdentifier: job.dataset.identifier, distributionIdentifier: job.dist.identifier, };