shallwefootball / upload-s3-action

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

fix: considering s3 error from s3.upload() #39

Closed manuartero closed 3 months ago

manuartero commented 2 years ago
when an error occurs at s3.upload()
current code was trying to execute the happy path.

  core.info(...data);
  resolve(...data);

this fix adds a execution-branch break if error.
manuartero commented 2 years ago

consideration: if an error occurs, code as it is now, will try to log data.{xxx} which would fail, raising an exception, and ending in the catch() branch.

This PR aims to change the original exception, instead of "cant read property xxx of undefined" to show the original s3 error

manuartero commented 3 months ago

closing this, i don't like having PRs that won't be merged xD