Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bogus error handling #9

Open
kittaakos opened this issue Jul 2, 2020 · 0 comments · Fixed by kittaakos/upload-s3-action#1
Open

Bogus error handling #9

kittaakos opened this issue Jul 2, 2020 · 0 comments · Fixed by kittaakos/upload-s3-action#1

Comments

@kittaakos
Copy link

I had this error with @1.0.1:

Run shallwefootball/s3-upload-action@v1.0.1
/home/runner/work/_actions/shallwefootball/s3-upload-action/v1.0.1/dist/index.js:8307
            throw err;
            ^

Error [TypeError]: (s || "").replace is not a function
    at escapeData (/home/runner/work/_actions/shallwefootball/s3-upload-action/v1.0.1/dist/index.js:8121:10)
    at Command.toString (/home/runner/work/_actions/shallwefootball/s3-upload-action/v1.0.1/dist/index.js:8115:35)
    at issueCommand (/home/runner/work/_actions/shallwefootball/s3-upload-action/v1.0.1/dist/index.js:8078:30)
    at Object.issue (/home/runner/work/_actions/shallwefootball/s3-upload-action/v1.0.1/dist/index.js:8082:5)
    at Object.error (/home/runner/work/_actions/shallwefootball/s3-upload-action/v1.0.1/dist/index.js:9545:15)
    at ManagedUpload.callback (/home/runner/work/_actions/shallwefootball/s3-upload-action/v1.0.1/dist/index.js:2430:21)
    at ManagedUpload.cleanup (/home/runner/work/_actions/shallwefootball/s3-upload-action/v1.0.1/dist/index.js:20775:10)
    at Request.<anonymous> (/home/runner/work/_actions/shallwefootball/s3-upload-action/v1.0.1/dist/index.js:20654:16)
    at Request.callListeners (/home/runner/work/_actions/shallwefootball/s3-upload-action/v1.0.1/dist/index.js:12939:20)
    at Request.emit (/home/runner/work/_actions/shallwefootball/s3-upload-action/v1.0.1/dist/index.js:12911:10) {
  message: '(s || "").replace is not a function',
  code: 'TypeError',
  time: 2020-07-02T16:11:58.172Z
}

Could not figure out what this is, then noticed the incorrect typing here:

if (err) core.error(err);

and here:

core.setOutput('object_locations', locations);

Obviously, my upload has failed but I do not know why because the error handling has failed. I will provide a PR soon.

kittaakos pushed a commit to kittaakos/upload-s3-action that referenced this issue Jul 2, 2020
 - Log the `message` of the  `Error` object.
 - Streamlined output to string for `fromjson`.
 - Aligned the documenation with the new `object_locations`value.

Closes shallwefootball#9

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos added a commit to kittaakos/upload-s3-action that referenced this issue Jul 2, 2020
@kittaakos kittaakos reopened this Jul 2, 2020
kittaakos pushed a commit to kittaakos/upload-s3-action that referenced this issue Jul 2, 2020
 - Log the `message` of the  `Error` object.
 - Streamlined output to string for `fromjson`.
 - Aligned the documenation with the new `object_locations`value.
 - Regenerated `dist`.

Closes shallwefootball#9

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit to kittaakos/upload-s3-action that referenced this issue Aug 4, 2020
 - Log the `message` of the  `Error` object. [actions/toolkit#370]
 - Streamlined output to string for `fromjson`.
 - Aligned the documenation with the new `object_locations`value.
 - Regenerated `dist`.

Closes shallwefootball#9

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant