{"_id":"@adobe/contentlake-shared-rest-error","_rev":"20-0187a67d96b8e490802fca555a0a3524","name":"@adobe/contentlake-shared-rest-error","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@adobe/contentlake-shared-rest-error","version":"1.0.0","author":"","license":"Apache-2.0","_id":"@adobe/contentlake-shared-rest-error@1.0.0","maintainers":[{"name":"adobehalls","email":"halls@adobe.com"},{"name":"fullcolorcoder","email":"bradjohn@adobe.com"},{"name":"marbec","email":"mabecker@adobe.com"},{"name":"tripod","email":"tripod@bocanegra.ch"},{"name":"garthdb","email":"garthdb@gmail.com"},{"name":"lazd","email":"lazdnet@gmail.com"},{"name":"adobe-admin","email":"grp-opensourceoffice@adobe.com"},{"name":"patrickfulton","email":"patrickfulton@gmail.com"},{"name":"trieloff","email":"lars@trieloff.net"},{"name":"shazron","email":"shazron@gmail.com"},{"name":"krisnye","email":"krisnye@gmail.com"},{"name":"dcpfsdk","email":"dcpfsdk@adobe.com"},{"name":"natebaldwin","email":"natebaldwindesign@gmail.com"},{"name":"devongovett","email":"devongovett@gmail.com"},{"name":"aspro83","email":"danniintheus@gmail.com"},{"name":"symanovi","email":"symanovi@adobe.com"},{"name":"dpfister","email":"dominique.pfister@gmail.com"},{"name":"stefan-guggisberg","email":"sg@adobe.com"},{"name":"korra","email":"npmjs.karo@cupdev.net"},{"name":"rofe","email":"npm@rofe.com"},{"name":"kptdobe","email":"kptdobe@gmail.com"}],"homepage":"https://github.com/adobe/contentlake-shared/tree/main/packages/rest-error#readme","bugs":{"url":"https://github.com/adobe/contentlake-shared/issues"},"dist":{"shasum":"c33d86c58468d6729148dce053e7e642e5073091","tarball":"https://registry.npmjs.org/@adobe/contentlake-shared-rest-error/-/contentlake-shared-rest-error-1.0.0.tgz","fileCount":5,"integrity":"sha512-LubT7639M+umJXjf1WOdxoCkJA+WlaQxJAW1nlFRo4fqWvO9Qz4AIl74rX9hBdr0N6JDcqCm9mVPBaIbVGJbPg==","signatures":[{"sig":"MEYCIQDW1L4cp8B6AKnJcfd+AoqDboK3sPFfWA3uYRcRd7r3uAIhAKuYwu7Dxj2m7h3SURecjQHg8ZsjFpjfoLPgq/fqcfu4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20399},"main":"src/index.js","type":"module","mocha":{"reporter":"mocha-multi-reporters","reporter-options":"configFile=../../.mocha-multi.json"},"gitHead":"250d9ca06f69e612656116113b3b58d11d7856e8","scripts":{"lint":"eslint .","test":"c8 mocha"},"_npmUser":{"name":"adobe-admin","email":"grp-opensourceoffice@adobe.com"},"repository":{"url":"git+https://github.com/adobe/contentlake-shared.git","type":"git"},"_npmVersion":"9.6.7","description":"Error type for returning rfc9457 problem responses","directories":{},"_nodeVersion":"18.17.1","dependencies":{"node-fetch":"^2.6.11","@adobe/helix-universal":"^4.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/contentlake-shared-rest-error_1.0.0_1692385521175_0.7803341271875441","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-08-18T19:05:21.053Z","modified":"2026-10-01T01:32:58.769Z","1.0.0":"2023-08-18T19:05:21.337Z"},"bugs":{"url":"https://github.com/adobe/contentlake-shared/issues"},"license":"Apache-2.0","homepage":"https://github.com/adobe/contentlake-shared/tree/main/packages/rest-error#readme","repository":{"url":"git+https://github.com/adobe/contentlake-shared.git","type":"git"},"description":"Error type for returning rfc9457 problem responses","maintainers":[{"email":"mabecker@adobe.com","name":"marbec"},{"email":"tripod@bocanegra.ch","name":"tripod"},{"email":"garthdb@gmail.com","name":"garthdb"},{"email":"lazdnet@gmail.com","name":"lazd"},{"email":"grp-opensourceoffice@adobe.com","name":"adobe-admin"},{"email":"patrickfulton@gmail.com","name":"patrickfulton"},{"email":"lars@trieloff.net","name":"trieloff"},{"email":"krisnye@gmail.com","name":"krisnye"},{"email":"dcpfsdk@adobe.com","name":"dcpfsdk"},{"email":"natebaldwindesign@gmail.com","name":"natebaldwin"},{"email":"devongovett@gmail.com","name":"devongovett"},{"email":"danniintheus@gmail.com","name":"aspro83"},{"email":"symanovi@adobe.com","name":"symanovi"},{"email":"dominique.pfister@gmail.com","name":"dpfister"},{"email":"sg@adobe.com","name":"stefan-guggisberg"},{"email":"npm@rofe.com","name":"rofe"},{"email":"kptdobe@gmail.com","name":"kptdobe"},{"email":"halls@adobe.com","name":"adobehalls"},{"email":"bradjohn@adobe.com","name":"fullcolorcoder"},{"email":"djaeggi@adobe.com","name":"djaeggi"},{"email":"dylandepass@gmail.com","name":"dylandepass"},{"email":"mhaack@adobe.com","name":"mhaack"},{"email":"amol@adobe.com","name":"amol-anand"},{"email":"stopp@adobe.com","name":"stopp-adobe"},{"email":"namarora@adobe.com","name":"namarora"},{"email":"doten@adobe.com","name":"doten"},{"email":"schmidt@adobe.com","name":"duh_schmidt"},{"email":"astha.bhargava23@gmail.com","name":"asthabh23"},{"email":"aljoseph@adobe.com","name":"aljoseph"},{"email":"zouhir.dahbi@outlook.com","name":"zdahbi"},{"email":"tuicu@adobe.com","name":"tuicu"},{"email":"fmeschbe@adobe.com","name":"fmeschbe"}],"readme":"# Content Lake Shared - REST Error\n\n> Error type for returning [rfc9457](https://datatracker.ietf.org/doc/html/rfc9457) problem responses\n\nThis is one of the [Content Lake Shared](https://github.com/adobe/contentlake-shared) libraries.\n\n## Status\n\n[![GitHub license](https://img.shields.io/github/license/adobe/contentlake-shared.svg)](https://github.com/adobe/contentlake-shared/blob/main/LICENSE.txt)\n\n## Usage\n\nInstall using:\n\n```\nnpm install @adobe/contentlake-shared-rest-error\n```\n\nUse with:\n\n```\nimport { RestError } from '@adobe/contentlake-shared-rest-error';\n\nthrow new RestError(400, 'Missing some field');\n```\n\n### Additional Properties\n\nTo add additional requests to the error body provide a third parameter as an Object:\n\n```\nthrow new RestError(400, 'Missing some field', { fields: ['field1', 'field2']});\n```\n\n### Converting to a Problem Response\n\nThe static method `toProblemResponse` can convert any object (including RestError objects) into a [rfc9457](https://datatracker.ietf.org/doc/html/rfc9457) problem responses:\n\n```\nRestError.toProblemResponse(err);\n```\n\nIn addition, you can provide a second context parameter from which the method will extract an instance from the invocation:\n\n```\nRestError.toProblemResponse(err, context);\n```\n","readmeFilename":"README.md"}