Socket
Socket
Sign inDemoInstall

@octokit/request-error

Package Overview
Dependencies
Maintainers
4
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/request-error - npm Package Compare versions

Comparing version 3.0.3 to 4.0.0

8

package.json
{
"name": "@octokit/request-error",
"description": "Error class for Octokit request errors",
"version": "3.0.3",
"version": "4.0.0",
"license": "MIT",

@@ -39,8 +39,8 @@ "files": [

"pika-plugin-unpkg-field": "^1.1.0",
"prettier": "2.8.3",
"prettier": "2.8.8",
"ts-jest": "^29.0.0",
"typescript": "^4.0.0"
"typescript": "^5.0.0"
},
"engines": {
"node": ">= 14"
"node": ">= 18"
},

@@ -47,0 +47,0 @@ "publishConfig": {

@@ -69,4 +69,21 @@ # http-error.js

### Usage with Octokit
```js
try {
// your code here that sends at least one Octokit request
await octokit.request("GET /");
} catch (error) {
// Octokit errors always have a `error.status` property which is the http response code
if (error.status) {
// handle Octokit error
} else {
// handle all other errors
throw error;
}
}
```
## LICENSE
[MIT](LICENSE)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc