{"id":16563961,"url":"https://github.com/carnesen/coded-error","last_synced_at":"2026-05-11T07:14:11.800Z","repository":{"id":46318646,"uuid":"163713940","full_name":"carnesen/coded-error","owner":"carnesen","description":"An enhanced `Error` class with additional properties \"code\" and \"data\"","archived":false,"fork":false,"pushed_at":"2021-10-30T22:10:16.000Z","size":365,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-26T21:10:03.998Z","etag":null,"topics":["javascript","micropackage","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carnesen.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-01T04:53:04.000Z","updated_at":"2021-10-30T22:10:19.000Z","dependencies_parsed_at":"2022-08-25T18:51:25.916Z","dependency_job_id":null,"html_url":"https://github.com/carnesen/coded-error","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/carnesen/coded-error","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carnesen%2Fcoded-error","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carnesen%2Fcoded-error/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carnesen%2Fcoded-error/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carnesen%2Fcoded-error/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carnesen","download_url":"https://codeload.github.com/carnesen/coded-error/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carnesen%2Fcoded-error/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267436893,"owners_count":24086910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","micropackage","nodejs","typescript"],"created_at":"2024-10-11T20:42:50.430Z","updated_at":"2026-05-11T07:14:11.755Z","avatar_url":"https://github.com/carnesen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **@carnesen/coded-error**\n\nAn `Error` class with additional properties \"code\" and \"data\"\n\n[![build status badge](https://github.com/carnesen/coded-error/workflows/test/badge.svg)](https://github.com/carnesen/coded-error/actions?query=workflow%3Atest+branch%3Amaster) [![npm version badge](https://badge.fury.io/js/%40carnesen%2Fcoded-error.svg)](https://www.npmjs.com/package/@carnesen/coded-error) [![github stars badge](https://img.shields.io/github/stars/carnesen/coded-error)](https://github.com/carnesen/coded-error)\n\n## Install\n\n```\n$ npm install @carnesen/coded-error\n```\nThis package includes runtime JavaScript files (ES2015) and the corresponding TypeScript type declarations.\n\n## Usage\n\n```typescript\nimport { CodedError } from '@carnesen/coded-error';\n\nconst err = new CodedError('An error has occurred', 127, { foo: 'bar' });\n\nconsole.log(err);\n/*\n{ CodedError: An error has occurred\n    at Object.\u003canonymous\u003e (/Users/carnesen/GitHub/coded-error/example.js:3:13)\n    at Module._compile (module.js:653:30)\n    at Object.Module._extensions..js (module.js:664:10)\n    at Module.load (module.js:566:32)\n    at tryModuleLoad (module.js:506:12)\n    at Function.Module._load (module.js:498:3)\n    at Function.Module.runMain (module.js:694:10)\n    at startup (bootstrap_node.js:204:16)\n    at bootstrap_node.js:625:3\n code: 127, data: { foo: 'bar' } }\n*/\n```\n## API\nThe constructor signature is:\n```typescript\nnew CodedError(message: string, code: any, data: any);\n```\nThis creates an object with properties `message`, `code`, and `data`. Besides that there's not much to know!\n\n## More information\nIf you encounter any bugs or have any questions or feature requests, please don't hesitate to file an issue or submit a pull request on [this project's repository on GitHub](https://github.com/carnesen/coded-error).\n\n## License\n\nMIT © [Chris Arnesen](https://www.carnesen.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarnesen%2Fcoded-error","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarnesen%2Fcoded-error","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarnesen%2Fcoded-error/lists"}