{"name":"@octokit-next/request-error","version":"2.3.0","keywords":["octokit","github","api"],"author":{"url":"https://github.com/gr2m","name":"Gregor Martynus"},"license":"MIT","_id":"@octokit-next/request-error@2.3.0","maintainers":[{"name":"gr2m","email":"gregor@martynus.net"},{"name":"octokitbot","email":"security+octokitbot@github.com"}],"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":"2a5413cb2c105f922995672f5784fe762a30ce28","tarball":"http://registry-npm.ywwl.com/@octokit-next/request-error/download/@octokit-next/request-error-2.3.0.tgz","fileCount":6,"integrity":"sha512-VFbXc5NdAU/ogEFzosoE6zqhHrXHUzTA2r+jgcvNm3SApW/OxjGeQmuXZEAg3yigTTsmRimbmIaOXiSAC7CWQw==","signatures":[{"sig":"MEYCIQDmJXs3rNsFDS5M68oDZ+TpnPZyzSoYGZ2Uw4sxFojdOwIhALjn38Q/3Yd+9v+ADpMB5rv1KxIPEjLVKFiQgP2itwwK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNLYuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoXSA/+IoMHK6C3C+Q1gJ2vA38UOrMRGwZw40ZeL2YJL+A5qIOJ6y+s\r\nPby21cOiYYbACJ8ytrfibZSyPie+pqfYxCQ+cy4eCSBNgYwISN9jPg4lP49W\r\n859fqaKgm2YkI9Hwgvb1M32DRkvKyLZK0DI1wux9EvNrlMA3YEnRFNJs0F8d\r\nWiHlBKwm6BEBUi4L4XBwBhvKFUDh+SkJLbT6wZ+MzlxfbZ1By3nFGNi+IOTB\r\nwPRiPYZ9R2FRitT3DT9iBX8rV5T+Lbgxg27RQ/3eI3fiOVR5Pp8uqfUGroPT\r\nAAZNXgILR3+2M4fHYQeyBDRGINnS0ZGzDzZeiYCO58ITg4qEDjObTFC86gCa\r\nso+clQIUAMYo9WSu7JHL8lrKErmfaJTSGxI8ZlpGlL02BvV9sPfhWF8/Z+nT\r\nju28Eh14nELgvMRIt+okAd69LoMcWGrH9YrfRxZslHap/aePVmKs+FN6J4Ki\r\n3Vl1m+k72UUZ0BL0rdLpl2TUGkReI2GLTurO22ERnrueQkeytQayGzrX0g13\r\nXK3iplKYk1X87WmyzCehEP5ESOzDllivI0CqYCpyfYazLG+P5VXj8UlPYinF\r\nrHEGD3tBaLJnoDCdrC1VXB4z7ySw63eOn2k/U0br0zr5mJjtJbLQkW7pw29X\r\ngHIXqXjTAgc3rkr/+eICEF8WNxAeAEN4R6U=\r\n=6Au5\r\n-----END PGP SIGNATURE-----\r\n","size":2709,"noattachment":false,"key":"/@octokit-next/request-error/-/@octokit-next/request-error-2.3.0.tgz"},"type":"module","types":"./index.d.ts","exports":"./index.js","gitHead":"3cb962c8a66f26033a5f6b66e75605c31f9439b8","scripts":{"test":"npm run test:code && npm run test:types","test:code":"c8 uvu test","test:types":"tsd"},"_npmUser":{"name":"octokitbot","email":"security+octokitbot@github.com"},"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.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/request-error_2.3.0_1664398894739_0.008162685135421954","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":1664398894927,"_cnpm_publish_time":1664398894927,"dist-tags":{"latest":"3.0.0"}}