-
Notifications
You must be signed in to change notification settings - Fork 11
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
Returned HttpError from octokit.graphql request is not of type RequestError #246
Comments
Hi @rickstaa, I'm sorry you are experiencing this issue. Also, thanks for the detailed explanation and for taking the time of sharing a CodeSandbok. It really helps a lot for reproducing the issue and debugging ❤️ . It seems to be a mismatch of Using I'm digging into why using |
@oscard0m Thanks a lot for your fast response and for providing me with the workaround. Feel free to let me know if you need more information. |
Apparently The 2 options you have here are:
Combinations of dependencies I've checked: It works with:
|
@oscard0m Thanks a lot for giving me such a detailed answer. Until |
I'm glad this information has been useful @rickstaa. I'm closing this issue but feel free to re-open if there is something else we can do. |
Not sure if this is a bug or a problem with my code, but I'm trying to catch HttpErrors returned by the octokit.graphql package using the Request error class. I use the following code in this sandbox to do this:
Unfortunately, the code always ends up at
console.log("An error with name set to 'HttpError'");
statement. I, however, was under the impression that all the request errors returned by the octokit packages are of type RequestError (see https://github.com/octokit/request.js/blob/39d8b114ac1455dc0266705e546f981748935433/src/fetch-wrapper.ts#L3) and they code would end up atconsole.log("A RequestError");
statement.The text was updated successfully, but these errors were encountered: