{"name":"@octokit-next/request-error","version":"2.2.0","keywords":["octokit","github","api"],"author":{"url":"https://github.com/gr2m","name":"Gregor Martynus"},"license":"MIT","_id":"@octokit-next/request-error@2.2.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":"4a1028b2eb4214595b04f32c714486c82b1a2bb2","tarball":"http://registry-npm.ywwl.com/@octokit-next/request-error/download/@octokit-next/request-error-2.2.0.tgz","fileCount":6,"integrity":"sha512-ZY5WP2xaZYQoBEv3OYkI7TkolpmkMfzMnSH2RTOmY7qv35dko1OZTYWdhiuBdVndZZFzLJ435vU/0fh37G46DA==","signatures":[{"sig":"MEQCIBYUi7rTLdfKdCMpL3/zBkOavHkUBZE3P34gM6D7BWsUAiAg/hPgeA/mAjNbv/6gr0VnWbb5G4h6nzqgQJ+n54yR5Q==","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\nwsFzBAEBCAAGBQJjMkb2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqD7Q//TNwKJeqlpcdNtDpGlwx7YVVwCXs54HUnWfhWZ9CnnQpqb8Ch\r\n0FgKMASeIDUrJpXM2k/uZP+3tPTmZKWkjY9DvqnIyv4F2l5z9renJRmfgnBP\r\n4Gd+e8ORQvEHQFppZ/74VzRIkk8A4sn0uuGQxUobNt7t6eS3AgV85ypIJ1nO\r\nFgSp3n2NX6i5rBfBaeodTMxK2bvwnz1osWbWMqnyKLsvhexjdDJ1HVsRASNA\r\neWjRKMjEC8XsJbXXaEtW+cgFkcY6P3tWr1BtLi++d9+CbYI2GzSJ0DkoZAm6\r\nSZKHmE7qjX8SO2jGA2IxB2BHA0Gy8KeebW7UBFLP0wI5RpM5wj0z2A6BMaI9\r\n2lpDC2Gktrrb4W60MTqMzH/XCaCWJpfZtT3VVtQCOm/eGAgfAWDV6TCdPp4n\r\nMsEOegat8p/tkKWIptqN7Om/fgQVky4w8lz10x4cA6tjcP2RSW2TDoQGoAq/\r\neIx2RFoTALnj490r6ctqw+Cg/6cQOMQ96dWyhsZPLd87UjghcBYR72bXLp9N\r\nXuH2RYqk7XMz5ntsTyfuneO7X8rtB/SzHbdV6Xxaxuyw/kpCSKNmND8ULgpZ\r\n9GE0UMnVlN2fl7rRbfD+4aiZpApr60IEVMIj6qGo839B467nyiC4CJNxS3Nc\r\nbbfsVR0q+0ieTl7nc/meXDCsM211S9tZoXM=\r\n=y/h6\r\n-----END PGP SIGNATURE-----\r\n","size":2729,"noattachment":false,"key":"/@octokit-next/request-error/-/@octokit-next/request-error-2.2.0.tgz"},"type":"module","types":"./index.d.ts","exports":"./index.js","gitHead":"2c51138f57e26528b652c64abb2ef93e89819a0b","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.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/request-error_2.2.0_1664239349942_0.8064774189847783","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":1664239350120,"_cnpm_publish_time":1664239350120,"dist-tags":{"latest":"3.0.0"}}