{"_id":"@octokit/request-error@7.1.1","bugs":{"url":"https://github.com/octokit/request-error.js/issues"},"dist":{"shasum":"cd928d96355742853905be847bb7ab6ec6a7d518","tarball":"http://registry-npm.ywwl.com/@octokit/request-error/download/@octokit/request-error-7.1.1.tgz","fileCount":6,"integrity":"sha512-+eaY7G2VVpSf2pc5Gn1+mph837V/d/TYTJAgWL9Tb0ogGYcpN3IlAVFgjL+Vv93F/sevrxkvsYCedtpLdcFLzA==","signatures":[{"sig":"MEQCIDb6ZC3ekf6VtRIiui52OscC/oAds9dDKDWvVLsiMEYsAiA6iitrIzwswX21uz0bqHxt4gXJv8t/gCl+0p65umI3Tg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIG8AqKaoOI3qqPgi1b0Iqv2tQrMgM9BT6bent0SoiyXHAiBY8WwezjSIU1nI0vdh/eGO3gHH2VM/gJnD/DrN8KucBw=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@octokit%2frequest-error@7.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":6543,"size":2994,"noattachment":false,"key":"/@octokit/request-error/-/@octokit/request-error-7.1.1.tgz"},"name":"@octokit/request-error","type":"module","types":"./dist-types/index.d.ts","unpkg":"dist-src/index.js","author":{"url":"https://github.com/gr2m","name":"Gregor Martynus"},"engines":{"node":">= 20"},"exports":{".":{"types":"./dist-types/index.d.ts","import":"./dist-src/index.js","default":"./dist-src/index.js"}},"gitHead":"960f0818f71a1a56bce8bc03fa6557b10215070e","license":"MIT","version":"7.1.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:38d8c570-b353-481e-984d-fc7c98905862"}},"homepage":"https://github.com/octokit/request-error.js#readme","keywords":["octokit","github","api","error"],"repository":{"url":"git+https://github.com/octokit/request-error.js.git","type":"git"},"_npmVersion":"11.19.0","description":"Error class for Octokit request errors","directories":{},"maintainers":[{"name":"octokitbot","email":"security+octokitbot@github.com"},{"name":"gr2m","email":"gregor@martynus.net"},{"name":"wolfy1339","email":"wolfy1339@outlook.com"}],"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"@octokit/types":"^17.0.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.0","esbuild":"^0.28.0","prettier":"3.7.4","tinybench":"^5.0.0","tinyglobby":"^0.2.15","typescript":"^5.0.0","@types/node":"^24.0.0","@octokit/tsconfig":"^4.0.0","@vitest/coverage-v8":"^4.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/request-error_7.1.1_1785595653698_0.5265409691515484"},"readme":"# request-error.js\n\n> Error class for Octokit request errors\n\n[![@latest](https://img.shields.io/npm/v/@octokit/request-error.svg)](https://www.npmjs.com/package/@octokit/request-error)\n[![Build Status](https://github.com/octokit/request-error.js/workflows/Test/badge.svg)](https://github.com/octokit/request-error.js/actions?query=workflow%3ATest)\n\n## Usage\n\n<table>\n<tbody valign=top align=left>\n<tr><th>\nBrowsers\n</th><td width=100%>\nLoad <code>@octokit/request-error</code> directly from <a href=\"https://esm.sh\">esm.sh</a>\n        \n```html\n<script type=\"module\">\nimport { RequestError } from \"https://esm.sh/@octokit/request-error\";\n</script>\n```\n\n</td></tr>\n<tr><th>\nNode\n</th><td>\n\nInstall with <code>npm install @octokit/request-error</code>\n\n```js\nimport { RequestError } from \"@octokit/request-error\";\n```\n\n</td></tr>\n</tbody>\n</table>\n\n> [!IMPORTANT]\n> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `\"moduleResolution\": \"node16\", \"module\": \"node16\"`.\n>\n> See the TypeScript docs on [package.json \"exports\"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).<br>\n> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus)\n\n```js\nconst error = new RequestError(\"Oops\", 500, {\n  request: {\n    method: \"POST\",\n    url: \"https://api.github.com/foo\",\n    body: {\n      bar: \"baz\",\n    },\n    headers: {\n      authorization: \"token secret123\",\n    },\n  },\n  response: {\n    status: 500,\n    url: \"https://api.github.com/foo\",\n    headers: {\n      \"x-github-request-id\": \"1:2:3:4\",\n    },\n    data: {\n      foo: \"bar\",\n    },\n  },\n});\n\nerror.message; // Oops\nerror.status; // 500\nerror.request; // { method, url, headers, body }\nerror.response; // { url, status, headers, data }\n```\n\n### Usage with Octokit\n\n```js\ntry {\n  // your code here that sends at least one Octokit request\n  await octokit.request(\"GET /\");\n} catch (error) {\n  // Octokit errors always have a `error.status` property which is the http response code\n  if (error.status) {\n    // handle Octokit error\n  } else {\n    // handle all other errors\n    throw error;\n  }\n}\n```\n\n## LICENSE\n\n[MIT](LICENSE)\n","publish_time":1785595653783,"_cnpm_publish_time":1785595653783,"dist-tags":{"beta":"6.0.0-beta.5","latest":"7.1.2","next":"2.1.0","release-5.x":"5.1.1"}}