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

enhancement: display more helpful error message other than undefined #438

Open
networkhermit opened this issue Apr 10, 2024 · 8 comments
Open

Comments

@networkhermit
Copy link

Currently when the action fails it displays undefined as part of the error message, which is not very helpful for debugging.

👩‍🏭 Creating new GitHub release for tag latest...
⚠️ GitHub release failed with status: 403
undefined
retrying... (2 retries remaining)
👩‍🏭 Creating new GitHub release for tag latest...
⚠️ GitHub release failed with status: 403
undefined
retrying... (1 retries remaining)
👩‍🏭 Creating new GitHub release for tag latest...
⚠️ GitHub release failed with status: 403
undefined
retrying... (0 retries remaining)
❌ Too many retries. Aborting...
Error: Too many retries.

I believe the specific line is in

}\n${JSON.stringify(error.response.data.errors)}\nretrying... (${

It seems that more helpful error message can be displayed (taken from my scratch fork to troubleshooting a coredns release issue):

          }\n${error}\nretrying... (${
👩‍🏭 Creating new GitHub release for tag v1.11.2 using commit "01bded8194be73ce4601ad608a0464166cee932a"...
⚠️ GitHub release failed with status: 403
HttpError: Resource not accessible by integration
retrying... (2 retries remaining)
👩‍🏭 Creating new GitHub release for tag v1.11.2 using commit "01bded8194be73ce4601ad608a0464166cee932a"...
⚠️ GitHub release failed with status: 403
HttpError: Resource not accessible by integration
retrying... (1 retries remaining)
👩‍🏭 Creating new GitHub release for tag v1.11.2 using commit "01bded8194be73ce4601ad608a0464166cee932a"...
⚠️ GitHub release failed with status: 403
HttpError: Resource not accessible by integration
retrying... (0 retries remaining)
❌ Too many retries. Aborting...
Error: Too many retries.

Related issue showing undefined: #217 #400 #411 #429

I'm not very familiar with typescript and the tooling used, so I hope some existing contributor or volunteer could help improve it.

Even more helpful error message other than plain undefined is appropriated too.

@networkhermit networkhermit changed the title enhancement: display more helpful error message than undefined enhancement: display more helpful error message other than undefined Apr 10, 2024
@softprops
Copy link
Owner

Thanks for capturing this in one gh issue. It's possible this regressed in a version bump. The point of logging the error was to provide helpful debugging when something goes wrong. I agree it's not at all helpful at the moment printing undefined.

I'm hoping to anyone willing to help with this one.

@till
Copy link
Contributor

till commented May 2, 2024

@softprops just ran into this too, can you try to dump the entire response since errors seems undefined? Or what do you think is required to help?

@till
Copy link
Contributor

till commented May 2, 2024

It seems like I cannot run this from a branch? Like I need to run some command to regenerate dist? If you can add details as I am also not familiar with TypeScript, then I can try to help.

@softprops
Copy link
Owner

softprops commented May 2, 2024

@till ah yes, if you run npm install to make sure you have dependencies installed then you can run npm build to generate a new packaged distribution file. This is ultimately what github actions uses as an entrypoint for the action

@softprops
Copy link
Owner

I just merged #447 could someone on this issue thread try a test release using the current master branch of this action? once we starting seeing data it should start shaking out the underlying issue

@till
Copy link
Contributor

till commented May 6, 2024

That was supposed to be for testing 😆

@softprops
Copy link
Owner

no worries. the more info we can gather the sooner we can get the underlying issue addressed

@till
Copy link
Contributor

till commented May 6, 2024

I figured out my problem: PAT was missing some permissions. In the end used the workflow token again and configured it appropriately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants