{"name":"@octokit-next/request-error","version":"2.7.1","keywords":["octokit","github","api"],"author":{"url":"https://github.com/gr2m","name":"Gregor Martynus"},"license":"MIT","_id":"@octokit-next/request-error@2.7.1","maintainers":[{"name":"octokit-next-bot","email":"octokit-next-bot@martynus.net"},{"name":"gr2m","email":"gregor@martynus.net"}],"homepage":"https://github.com/octokit/octokit-next.js/tree/main/packages/request-error#readme","bugs":{"url":"https://github.com/octokit/octokit-next.js/issues"},"dist":{"shasum":"fe8e4a54d2b3150e7b6e20e032a9a1f03da598ff","tarball":"http://registry-npm.ywwl.com/@octokit-next/request-error/download/@octokit-next/request-error-2.7.1.tgz","fileCount":6,"integrity":"sha512-EBIjY9RbqT3n8W3PJVoBAdBycUnl3pGWUnLyNrrrUkt6+31NU+m0+Z+SF3ArAlYu21OZtAKniy58r7ltU0cM3Q==","signatures":[{"sig":"MEQCID8dpl8gDPRbuyqA4O3d2EThbxzbct6ExQdFnzonOVQgAiBeuW4L9qRnNY/PKR0fLqnXj9+awOWRomgrX66XX3uEPA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8906,"size":2646,"noattachment":false,"key":"/@octokit-next/request-error/-/@octokit-next/request-error-2.7.1.tgz"},"type":"module","types":"./index.d.ts","exports":"./index.js","gitHead":"0cf3ec89f005df0d663576c628cfc136d42bf5e8","scripts":{"test":"npm run test:code && npm run test:types","test:code":"c8 --100 ava test","test:types":"tsd"},"_npmUser":{"name":"octokit-next-bot","email":"octokit-next-bot@martynus.net"},"repository":{"url":"git+https://github.com/octokit/octokit-next.js.git","type":"git","directory":"packages/request-error"},"_npmVersion":"9.8.0","description":"Error class for Octokit request errors","directories":{},"_nodeVersion":"18.16.1","dependencies":{"@octokit-next/types":"2.7.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/request-error_2.7.1_1689552146823_0.9740219356641995","host":"s3://npm-registry-packages"},"readme":"# request-error.js\n\n> Error class for Octokit request errors\n\n[![@latest](https://img.shields.io/npm/v/@octokit-next/request-error.svg)](https://www.npmjs.com/package/@octokit-next/request-error)\n[![Build Status](https://github.com/octokit-next/request-error.js/workflows/Test/badge.svg)](https://github.com/octokit-next/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-next/request-error</code> directly from <a href=\"https://cdn.skypack.dev\">cdn.skypack.dev</a>\n        \n```html\n<script type=\"module\">\nimport { RequestError } from \"https://cdn.skypack.dev/@octokit-next/request-error\";\n</script>\n```\n\n</td></tr>\n<tr><th>\nNode\n</th><td>\n\nInstall with <code>npm install @octokit-next/request-error</code>\n\n```js\nimport { RequestError } from \"@octokit-next/request-error\";\n```\n\n</td></tr>\n</tbody>\n</table>\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## LICENSE\n\n[MIT](LICENSE)\n","publish_time":1689552147031,"_cnpm_publish_time":1689552147031,"dist-tags":{"latest":"3.0.0"}}