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

Add rough error handler for Octokit response parsing failures to 1.x and 2.x release #265

Open
JamesMGreene opened this issue Nov 30, 2023 · 0 comments

Comments

@JamesMGreene
Copy link
Contributor

This is intended as the 1.x and 2.x equivalent to shipping:

Addressing #258 will resolve misleading error scenarios where the error message that shows up in the Actions logs says something like HttpError: invalid json response body and reason: Unexpected end of JSON input. This occurs when Octokit receives a response with an error code (e.g. 400) but the accompanying response text is either not JSON-compatible for parsing, or is just not provided at all (empty).

This was resolved in Octokit with the following PR:

However, the subsequent Octokit release is not compatible with Node 16.x, and therefore cannot be pulled in as a dependency until we merge #256 and cut a new 3.x release.

Sadly, a new 3.x release won't help all of our GHES customers.

Therefore, we should consider implementing a rough workaround fix (i.e. a catch watching for this exact error) in this scenario so we log fewer "red herring" error messages. 🐟

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

1 participant