diff --git a/tools/actions/upload-images/build/main.js b/tools/actions/upload-images/build/main.js index d00ee954de20..dedd5ee4572d 100644 --- a/tools/actions/upload-images/build/main.js +++ b/tools/actions/upload-images/build/main.js @@ -10760,11 +10760,11 @@ var uploadImage = async () => { if (i3 > 2) { return "error"; } - const form = new FormData3(); - form.set("type", "file"); - form.set("image", file); - const encoder = new FormDataEncoder(form); try { + const form = new FormData3(); + form.set("type", "file"); + form.set("image", file); + const encoder = new FormDataEncoder(form); const res = await fetch("https://api.imgur.com/3/image", { method: "POST", headers: { @@ -10779,6 +10779,7 @@ var uploadImage = async () => { } return link; } catch (e3) { + core.setOutput("error", e3); await wait(3e3); return upload(file, i3 + 1); } diff --git a/tools/actions/upload-images/main.ts b/tools/actions/upload-images/main.ts index 55c03fafd120..9ababc899aad 100644 --- a/tools/actions/upload-images/main.ts +++ b/tools/actions/upload-images/main.ts @@ -53,6 +53,7 @@ const uploadImage = async () => { } return link; } catch (e) { + core.setOutput("error", e); await wait(3000); return upload(file, i + 1); }