{"name":"@octokit-next/request-error","version":"2.3.1","keywords":["octokit","github","api"],"author":{"url":"https://github.com/gr2m","name":"Gregor Martynus"},"license":"MIT","_id":"@octokit-next/request-error@2.3.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"},"c8":{"lines":100,"branches":100,"functions":100,"statements":100,"check-coverage":true},"dist":{"shasum":"c7f98719b5c14c8927e0eb45f305e65765d7b7bc","tarball":"http://registry-npm.ywwl.com/@octokit-next/request-error/download/@octokit-next/request-error-2.3.1.tgz","fileCount":6,"integrity":"sha512-yc48/0+e7N9gPJ0TuZ8l4gnfqWzbvhbzq1JO8/ON2wR9YW+ogqhDGM37+HCR+/19SV8NQzSrhI9nJbrC6CpeEA==","signatures":[{"sig":"MEYCIQCtUJx0Zeh9qv22CWyJ7WRfFDVyQDXhOeAiuonIRV9lewIhANj8WchkhQKwJjJo7KkCWEeyfb8JssRzxuCeYgnDIxgX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjO2BaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrqHA/8CvbXZahO89I/GwIVyCIHJ9dDrVc3ont9wo9uNLTpBPfDdesU\r\n9S/SjzBDF081TRlDyElEqGSBc7/TMhytHdUGFwMrpVRaz98fn/2nwAAeYYiC\r\n0Ogp9Nr8SiStQCoYpRQzVJ+JyZG0S5fAa/kUNumh+LLXhkGb3unoUhxaoGez\r\ntOIdbtM8AmqaikZmtb6451cyQU6Bl46YZHVMz3+TCoeABPIROUWlwn1gravU\r\nFSZTIPdbjl1lBiD39q5nZH4dIO3qlAxUrQkTzbLbHZrzpTUpj2oSKxhy2wl+\r\nYpM2NLtBZJhUedNirnO5JXAk6fan0+IGBLI6QOE9+JHxDRXjlxTueQlSRN/r\r\nvRLw+bmywk0MKN01YctWL5DiXeXRR/lxGXdUip8FX1fNYJwk0eSTvQLJPAJt\r\nA8CrVqBgaxjnhDwF9ZwSMOvMT+ZzcGIkuUVWGh7oC7pK3dzp2UABpz2smD/7\r\n6Z8KsCoFjqA+yJHhCFDp8HLtbs9dTr6HbQhH20UmhnA2Mqg1LISs0tnggDtv\r\nj7ScvHWIaX6brmxXFJ3xCp95KV1Phlx+8z2EFdZK61uRA8QrEWzXr1ltPSdV\r\nk5MmkEwVtW7sEq4ZHLZTpxPEPB5kAEv/oHKCf6L67GrfL+gRq5UdV5XgWPCo\r\nfdb0v4t/xNGRRHDMMe1BAyycsCZpbQmrblo=\r\n=8xzH\r\n-----END PGP SIGNATURE-----\r\n","size":2686,"noattachment":false,"key":"/@octokit-next/request-error/-/@octokit-next/request-error-2.3.1.tgz"},"type":"module","types":"./index.d.ts","exports":"./index.js","gitHead":"80f7b7c3e9dfa6c338e28d5d9625602af3ca3eab","scripts":{"test":"npm run test:code && npm run test:types","test:code":"c8 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":"8.19.2","description":"Error class for Octokit request errors","directories":{},"_nodeVersion":"16.17.0","dependencies":{"@octokit-next/types":"2.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/request-error_2.3.1_1664835674753_0.5188757446316847","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":1664835674938,"_cnpm_publish_time":1664835674938,"dist-tags":{"latest":"3.0.0"}}