checkout-files icon indicating copy to clipboard operation
checkout-files copied to clipboard

Should fail explicitly on promise rejection

Open JamesMGreene opened this issue 3 years ago • 0 comments

During a recent workflow run, I attempted to use the checkout-files Action to checkout a fairly large package-lock.json file (npm lockfile) weighing in at about 2 MB. I received this unhandled promise rejection:

Run Bhacaz/checkout-files@c8f01756bfd894ba746d5bf48205e19000b0742b
(node:1939) UnhandledPromiseRejectionWarning: HttpError: This API returns blobs up to 1 MB in size. The requested blob is too large to fetch via the API, but you can use the Git Data API to request blobs up to 100 MB in size.: {"resource":"Blob","field":"data","code":"too_large"}
    at /home/runner/work/_actions/Bhacaz/checkout-files/c8f01756bfd894ba746d5bf48205e19000b0742b/node_modules/@octokit/request/dist-node/index.js:66:23
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Notably, this did not cause the step to fail because it was unhandled:

image

This Action should definitely handle this potential promise rejection and cause the step to explicitly fail.

JamesMGreene avatar Sep 22 '21 21:09 JamesMGreene