
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@octokit/plugin-retry
Advanced tools
Implements request retries for server 4xx/5xx responses except 400, 401, 403 and 404.
const Octokit = require('@ocotkit/rest')
.plugin(require('@octokit/plugin-retry'))
const octokit = new Octokit()
// retries request up to 3 times in case of a 500 response
octokit.request('/').catch(error => {
if (error.request.request.retryCount) {
console.log(`request failed after ${error.request.request.retryCount} retries`)
}
console.error(error)
})
To override the default doNotRetry list:
const octokit = new Octokit({
retry: {
doNotRetry: [ /* List of HTTP 4xx/5xx status codes */ ]
}
})
You can manually ask for retries for any request by passing { request: { retries: numRetries, retryAfter: delayInSeconds }}
octokit.request('/', { request: { retries: 1, retryAfter: 1 } }).catch(error => {
if (error.request.request.retryCount) {
console.log(`request failed after ${error.request.request.retryCount} retries`)
}
console.error(error)
})
Pass { retry: { enabled: false } } to disable this plugin.
axios-retry is a library that adds a retry feature to axios, a popular HTTP client. Similar to @octokit/plugin-retry, it helps in handling transient network errors by retrying failed requests. However, axios-retry is generic and can be used with any axios request, whereas @octokit/plugin-retry is specifically tailored for Octokit and GitHub API interactions.
fetch-retry extends the fetch API to support retries in a similar manner to @octokit/plugin-retry. It allows configuring retry count, retry delay, and retry on specific HTTP methods or status codes. Unlike @octokit/plugin-retry, which is designed for Octokit and GitHub API, fetch-retry can be used with any fetch-based requests, making it more versatile for different APIs.
FAQs
Automatic retry plugin for octokit
The npm package @octokit/plugin-retry receives a total of 5,764,309 weekly downloads. As such, @octokit/plugin-retry popularity was classified as popular.
We found that @octokit/plugin-retry demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.