debug prints

This commit is contained in:
Kiara Grouwstra 2022-01-03 18:47:43 +01:00
parent af686535e7
commit 81c7890e03
1 changed files with 10 additions and 4 deletions

View File

@ -40,7 +40,9 @@ const migrate = async (node, resource) => {
catch (e) {
console.error(`failed to upload "${block.attributes.href}"`)
}
}));
})).catch((error) => {
console.error(error);
});
media.length = 0;
let featured = null;
@ -75,7 +77,7 @@ const migrate = async (node, resource) => {
})
}
catch (e) {
console.error(`failed to create "${url}"`)
console.error(`failed to create "${url}"`);
}
await Promise.all(mediaIds.map(async (mediaId) => {
@ -83,7 +85,9 @@ const migrate = async (node, resource) => {
post: id,
date_gmt: new Date(node.publishedAt)
});
}));
})).catch((error) => {
console.error(error);
});
}
const download = async (location) => {
@ -117,4 +121,6 @@ const findVacatures = () => {
migrate(node, () => wp.vacatures()) :
migrate(node, () => wp.pages());
}, Promise.resolve());
})()
})().catch((error) => {
console.error(error);
});