shallwefootball / upload-s3-action

github action for upload to S3 ☁️
https://github.com/marketplace/actions/upload-s3
166 stars 158 forks source link

Outdated error handling #12

Closed bdhsu closed 4 years ago

bdhsu commented 4 years ago
Run shallwefootball/s3-upload-action@v1.1.0
uploaded - signed/file.pkg
located - https://***.s3.us-west-1.amazonaws.com/signed/file.pkg
object key - signed
object locations - https://***.s3.us-west-1.amazonaws.com/signed/file.pkg
(node:6223) UnhandledPromiseRejectionWarning: TypeError: (s || "").replace is not a function
    at escapeData (/Users/runner/work/_actions/shallwefootball/s3-upload-action/v1.1.0/dist/index.js:8125:10)
    at Command.toString (/Users/runner/work/_actions/shallwefootball/s3-upload-action/v1.1.0/dist/index.js:8119:35)
    at issueCommand (/Users/runner/work/_actions/shallwefootball/s3-upload-action/v1.1.0/dist/index.js:8082:30)
    at Object.issue (/Users/runner/work/_actions/shallwefootball/s3-upload-action/v1.1.0/dist/index.js:8086:5)
    at Object.error (/Users/runner/work/_actions/shallwefootball/s3-upload-action/v1.1.0/dist/index.js:9549:15)
    at /Users/runner/work/_actions/shallwefootball/s3-upload-action/v1.1.0/dist/index.js:2466:10
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:6223) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6223) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I experienced this error with v1.1.0. Upon further observation, this is due to @actions/core version 1.2.3 not supporting non-string inputs for errors.

This can fixed by updating @actions/core ^1.2.3 dependency to @actions/core ^1.2.4 https://github.com/actions/toolkit/commit/187d4aa6250e38be6346f705d565569850bf0c3f