{"name":"@octokit-next/request-error","version":"2.1.1","keywords":["octokit","github","api"],"author":{"url":"https://github.com/gr2m","name":"Gregor Martynus"},"license":"MIT","_id":"@octokit-next/request-error@2.1.1","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":"ae8e63ab3863cfb4873ac5d97ba6f32f3019e656","tarball":"http://registry-npm.ywwl.com/@octokit-next/request-error/download/@octokit-next/request-error-2.1.1.tgz","fileCount":6,"integrity":"sha512-uD0M38uKzdIUAwlaMMjtEirxZWyXnjo26IrCks2mxO6gXquI5byuWOa3R7Xcc9WtiRnrzQivsEAxPrSHxpe8gg==","signatures":[{"sig":"MEUCIQCuAWZJKEbBKke/PNvUs6Tj3gyb2ws3zSdNPha7NzkjZwIgG6905sNEHkdNB9wtEwGluyOi4A5CKJ7tLh2FK47BuWo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLjxuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4UQ/7Bb1ovb4mrBGVDBzq2zqqfg5BKbB/Nt8U7G8i8ZBAibSguKwc\r\npzjnX27GL9CQLwRLZBlatxpLAftexkXu665gUi83XbRJE97FNxBFCEuThY/v\r\n3B3dXHMC48KJ2MTMUU0X2U989MmxF1d+On7e2OFuAspjfQImtfGSFV+TWfw5\r\nUVNIYLJXh3QogWrDbFSil4n2msgO3B8jDfx/7hsRdM4WfNnvxXK1Qc6DowmX\r\nwJL7ULkIXDEUMAXv0LPZQavnU7QBbEuLUViFb+m8d1u+tUeqxJVy3kAmUKSH\r\ndfxefey244GzShWka2U6NkfaO1fpZXun0RJsy019j85teeGVduJc/1eMMhXo\r\nTwzua/gTks/b6XgFEFQaEMRD/NAnGzfy8231FZDWtOReIdJBV32oU5hgWALw\r\np21n4uXnPe8fQd1g2ribauIahKqsttR5eF6b3gOaekR+4Q1BOefS78CtzJjQ\r\nRxzTRE4bkZbc3ucKO5LMa7IN3E2tbhHI13lTE9mZ1agpILnuKbogGi4Y+3PY\r\ngZ2G2Pgs06SH1gQTmmq4iPHdsqjqPdxhIKmR7d303TK4oRd0mD1zcV2xhP5P\r\n620lPvkhTw0Uk9X8LaqJlYK3civLfB+fV02pk4dOxtvOJnr0YAtORk1LS06g\r\nnNenZuF5zb5/5HN56wj7SOS10A9fmJOyzrc=\r\n=lgH1\r\n-----END PGP SIGNATURE-----\r\n","size":2729,"noattachment":false,"key":"/@octokit-next/request-error/-/@octokit-next/request-error-2.1.1.tgz"},"type":"module","types":"./index.d.ts","exports":"./index.js","gitHead":"e6f5d748e51f86e1fbebe0b74b08116a03e1b043","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.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/request-error_2.1.1_1663974510210_0.7108379049442364","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":1663974510375,"_cnpm_publish_time":1663974510375,"dist-tags":{"latest":"3.0.0"}}