{"id":24518225,"url":"https://github.com/flasd/smart-error","last_synced_at":"2025-03-15T11:12:09.863Z","repository":{"id":96503895,"uuid":"165912958","full_name":"flasd/smart-error","owner":"flasd","description":"Show rich error messages during development and vague messages in production.","archived":false,"fork":false,"pushed_at":"2019-01-15T20:53:35.000Z","size":163,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-22T01:41:26.041Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/flasd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-15T19:45:26.000Z","updated_at":"2019-01-15T20:53:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9066760-36d6-4e06-9c58-13e3fe5bc740","html_url":"https://github.com/flasd/smart-error","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flasd%2Fsmart-error","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flasd%2Fsmart-error/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flasd%2Fsmart-error/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flasd%2Fsmart-error/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flasd","download_url":"https://codeload.github.com/flasd/smart-error/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243719398,"owners_count":20336607,"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","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":[],"created_at":"2025-01-22T01:41:05.332Z","updated_at":"2025-03-15T11:12:09.838Z","avatar_url":"https://github.com/flasd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smart Error\n\nShow rich error messages during development and vague messages in production.\n\n[![Build Status](https://travis-ci.org/@flasd/smart-error.svg?branch=master)](https://travis-ci.org/@flasd/smart-error)\n[![Coverage Status](https://coveralls.io/repos/github/@flasd/smart-error/badge.svg?branch=master)](https://coveralls.io/github/@flasd/smart-error?branch=master)\n[![npm version](https://badge.fury.io/js/@flasd/smart-error.svg)](https://www.npmjs.com/package/@flasd/smart-error)\n[![npm downloads per month](https://img.shields.io/npm/dm/@flasd/smart-error.svg)](https://www.npmjs.com/package/@flasd/smart-error)\n\n### Instalation\n\nInstall the latest version using NPM:\n\n```sh\nnpm install @flasd/smart-error\n```\n\n### Usage\n\n```javascript\nimport SmartError from \"@flasd/smart-error\";\n\nthrow new SmartError(/* regular error params */);\n```\n\nAdditionaly you can pass a callback to get called anytime you call the constructor:\n\n```javascript\nimport SmartError from \"@flasd/smart-error\";\n\nSmartError.setReportFunction(error =\u003e {\n  // do your magic! You can throw erros here, we'll catch them for you.\n  // this function can even be async (return a promise!)\n\n  console.error(error);\n});\n\nthrow new SmartError(\"miau\");\n// VM1:1 Uncaught Error: miau\n//  at \u003canonymous\u003e:1:7\n//\n```\n\nIf you'd want to remove the reporting listener:\n\n```javascript\nimport SmartError from \"@flasd/smart-error\";\n\nconst removeListener = SmartError.setReportFunction(error =\u003e {});\n\nremoveListener();\n```\n\n### Copyright e Licença\n\nCopyright (c) 2019 [Marcel de Oliveira Coelho](https://github.com/flasd) under the [MIT License](https://github.com/flasd/smart-error/blob/master/LICENSE.md). Go Crazy. :rocket:","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflasd%2Fsmart-error","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflasd%2Fsmart-error","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflasd%2Fsmart-error/lists"}