Gathering detailed insights and metrics for @octokit/request-error
Gathering detailed insights and metrics for @octokit/request-error
Gathering detailed insights and metrics for @octokit/request-error
Gathering detailed insights and metrics for @octokit/request-error
Error class for Octokit request errors
npm install @octokit/request-error
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.4
Supply Chain
97
Quality
89
Maintenance
100
Vulnerability
100
License
TypeScript (65.31%)
JavaScript (34.69%)
Total Downloads
1,907,404,806
Last Day
2,534,671
Last Week
14,357,407
Last Month
58,317,079
Last Year
583,607,884
MIT License
18 Stars
561 Commits
13 Forks
8 Watchers
6 Branches
21 Contributors
Updated on May 20, 2025
Latest Version
7.0.0
Package Id
@octokit/request-error@7.0.0
Unpacked Size
6.22 kB
Size
2.84 kB
File Count
6
NPM Version
10.9.2
Node Version
22.15.0
Published on
May 20, 2025
Cumulative downloads
Total Downloads
Last Day
3.8%
2,534,671
Compared to previous day
Last Week
5.3%
14,357,407
Compared to previous week
Last Month
1.6%
58,317,079
Compared to previous month
Last Year
33.8%
583,607,884
Compared to previous year
1
Error class for Octokit request errors
Browsers |
Load @octokit/request-error directly from esm.sh
|
---|---|
Node |
Install with
|
[!IMPORTANT] As we use conditional exports, you will need to adapt your
tsconfig.json
by setting"moduleResolution": "node16", "module": "node16"
.See the TypeScript docs on package.json "exports".
See this helpful guide on transitioning to ESM from @sindresorhus
1const error = new RequestError("Oops", 500, { 2 request: { 3 method: "POST", 4 url: "https://api.github.com/foo", 5 body: { 6 bar: "baz", 7 }, 8 headers: { 9 authorization: "token secret123", 10 }, 11 }, 12 response: { 13 status: 500, 14 url: "https://api.github.com/foo", 15 headers: { 16 "x-github-request-id": "1:2:3:4", 17 }, 18 data: { 19 foo: "bar", 20 }, 21 }, 22}); 23 24error.message; // Oops 25error.status; // 500 26error.request; // { method, url, headers, body } 27error.response; // { url, status, headers, data }
1try { 2 // your code here that sends at least one Octokit request 3 await octokit.request("GET /"); 4} catch (error) { 5 // Octokit errors always have a `error.status` property which is the http response code 6 if (error.status) { 7 // handle Octokit error 8 } else { 9 // handle all other errors 10 throw error; 11 } 12}
5.3/10
Summary
@octokit/request-error has a Regular Expression in index that Leads to ReDoS Vulnerability Due to Catastrophic Backtracking
Affected Versions
>= 6.0.0, < 6.1.7
Patched Versions
6.1.7
5.3/10
Summary
@octokit/request-error has a Regular Expression in index that Leads to ReDoS Vulnerability Due to Catastrophic Backtracking
Affected Versions
>= 1.0.0, < 5.1.1
Patched Versions
5.1.1
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
14 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
SAST tool is run on all commits
Details
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
Reason
Found 3/4 approved changesets -- score normalized to 7
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-05-12
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More