Octokit Network errors #2162
Replies: 2 comments
-
I don't think that the For browsers, I'd recommend the minimal amount of code, which is https://github.com/octokit/core.js. Then add only the plugins you need, such as pagination for REST APIs: https://github.com/octokit/plugin-paginate-rest.js It sounds like you are using the https://github.com/octokit/plugin-request-log.js, which is built into |
Beta Was this translation helpful? Give feedback.
-
Hey @gr2m , I'm using
so what I'm trying to do is to avoid getting the 404 errors and decide by myself when to console.error about a missing resource. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I wanted to know if there is a way / best practice to "suppress" the network errors that Octokit might get.
I know that eventually if Octokit makes a request to the GH REST API and it gets rejected (with 404 for example), the network error will be shown in the browser's console. So I wonder if there is a way to "check if exists"/ "check if can fetch data" before actually requesting it.
Because currently, the library causes a lot of errors on the browser and I'd like to make it a little cleaner :)
thanks!
Beta Was this translation helpful? Give feedback.
All reactions