{"id":13459447,"url":"https://github.com/nestjsx/nestjs-flub","last_synced_at":"2025-04-05T10:07:33.294Z","repository":{"id":26913349,"uuid":"111903948","full_name":"nestjsx/nestjs-flub","owner":"nestjsx","description":"Pretty Error 😫 Stack Viewer for NestJS Framework 🛠️","archived":false,"fork":false,"pushed_at":"2024-01-11T11:21:15.000Z","size":1245,"stargazers_count":250,"open_issues_count":20,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-29T22:37:19.506Z","etag":null,"topics":["errors","nestjs"],"latest_commit_sha":null,"homepage":"","language":"Mustache","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/nestjsx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-11-24T10:05:29.000Z","updated_at":"2024-10-25T18:19:58.000Z","dependencies_parsed_at":"2024-01-13T05:05:59.424Z","dependency_job_id":null,"html_url":"https://github.com/nestjsx/nestjs-flub","commit_stats":{"total_commits":54,"total_committers":11,"mean_commits":4.909090909090909,"dds":0.6851851851851851,"last_synced_commit":"9105f51e6e5fa1806efb5595fbe9b418939e0a24"},"previous_names":["shekohex/nestjs-flub"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjsx%2Fnestjs-flub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjsx%2Fnestjs-flub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjsx%2Fnestjs-flub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjsx%2Fnestjs-flub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nestjsx","download_url":"https://codeload.github.com/nestjsx/nestjs-flub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247293999,"owners_count":20915329,"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":["errors","nestjs"],"created_at":"2024-07-31T09:01:22.692Z","updated_at":"2025-04-05T10:07:33.268Z","avatar_url":"https://github.com/nestjsx.png","language":"Mustache","funding_links":[],"categories":["Mustache"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/43827489?s=400\u0026u=45ac0ac47d40b6d8f277c96bdf00244c10508aef\u0026v=4\"/\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://travis-ci.org/nestjsx/nestjs-flub\"\u003e\u003cimg src=\"https://travis-ci.org/nestjsx/nestjs-flub.svg?branch=master\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/nestjs-flub\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/nestjs-flub.svg\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/nestjsx/nestjs-flub/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/nestjsx/nestjs-flub.svg\"/\u003e\u003c/a\u003e\n    \u003ca href='https://coveralls.io/github/nestjsx/nestjs-flub?branch=master'\u003e\u003cimg src='https://coveralls.io/repos/github/nestjsx/nestjs-flub/badge.svg?branch=master' alt='Coverage Status' /\u003e\u003c/a\u003e\n    \u003ca href=\"https://greenkeeper.io/\"\u003e\u003cimg src=\"https://badges.greenkeeper.io/shekohex/nestjs-flub.svg\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eNestjs Flub\u003c/h1\u003e\n\nPretty ErrorHandler 😫, Stack Viewer for [Nestjs Framework](https://nestjs.com/) 🛠️\n\u003e it's just a simple `Filter` for Catching the Errors\n\n## Features\n\n1. HTML reporter\n\n2. JSON reporter, if request accepts a json instead of text/html.\n\n3. Sorted frames of error stack.\n\n4. Themes\n\n\n### Dark Theme\n![dark](https://files.gitter.im/nestjs/nestjs/qkqB/error-dark.png)\n\n### Light Theme\n![light](https://files.gitter.im/nestjs/nestjs/z6X6/error-light.png)\n\n## Install\n\n```bash\nnpm install nestjs-flub --save\n```\n\n## Simple Usage\nJust add this filter as you would any filter:\n```typescript\nimport { FlubErrorHandler } from 'nestjs-flub';\n@Controller('cats')\n@UseFilters(new FlubErrorHandler())\nexport class CatsController { \n\n@Get('/error')\n  throwError() {\n    throw new Error('Very Bad Error');\n  }\n}\n\n```\n\n## Configuration \n **FlubErrorHandler** accepts an optional object to configure the Error Handler. For now, it only has two Options:\n ```typescript\ntheme: string; // for themes ['dark', 'light', 'default']\nquote: boolean; // for displaying  very good quotes\n ```\n example\n \n ```typescript\n @UseFilters(new FlubErrorHandler({ theme: 'dark', quote:true }))\n ```\n #### Theming\n \n copy `/src/themes/error.default.mustache` and play\n \n ## TODO \n- [ ] Write Tests\n- [ ] list syntax required\n\n ## Contributing\n\nYou are welcome to contribute to this project. If you want to add new themes, make a new PR containing the theme and a simple image to represent it\n\n## Global filters \n\nUse flub error handler for all controllers \n\n```typescript \nasync function bootstrap() {\n  const app = await NestFactory.create(ApplicationModule);\n  app.useGlobalFilters(new FlubErrorHandler());\n  await app.listen(3000);\n}\nbootstrap();\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnestjsx%2Fnestjs-flub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnestjsx%2Fnestjs-flub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnestjsx%2Fnestjs-flub/lists"}