All Projects β†’ nestjsx β†’ Nestjs Flub

nestjsx / Nestjs Flub

Licence: mit
Pretty Error 😫 Stack Viewer for NestJS Framework πŸ› οΈ

Projects that are alternatives of or similar to Nestjs Flub

Automapper
An Object-Object AutoMapper module for NestJS.
Stars: ✭ 110 (-30.38%)
Mutual labels:  nestjs
Nest Cnode
CNode 瀾区 Nest η‰ˆζœ¬ https://cnodejs.org/
Stars: ✭ 125 (-20.89%)
Mutual labels:  nestjs
Throttler
A rate limiting module for NestJS to work with Fastify, Express, GQL, Websockets, and RPC 🧭
Stars: ✭ 145 (-8.23%)
Mutual labels:  nestjs
Error Handler
The ErrorHandler component provides tools to manage errors and ease debugging PHP code.
Stars: ✭ 1,852 (+1072.15%)
Mutual labels:  errors
Nestjs Amqp
Amqp connections for nestjs πŸ’Œ
Stars: ✭ 123 (-22.15%)
Mutual labels:  nestjs
Nest Event
Event handling with decorators for NestJS Framework
Stars: ✭ 128 (-18.99%)
Mutual labels:  nestjs
Nestjs Realworld Example App
Exemplary real world backend API built with NestJS + TypeORM / Prisma
Stars: ✭ 1,838 (+1063.29%)
Mutual labels:  nestjs
Bugsnag Go
Automatic panic monitoring for Go and Go web frameworks, like negroni, gin, and revel
Stars: ✭ 155 (-1.9%)
Mutual labels:  errors
Node Rate Limiter Flexible
Node.js rate limit requests by key with atomic increments in single process or distributed environment.
Stars: ✭ 1,950 (+1134.18%)
Mutual labels:  nestjs
Schedule
Schedule module for Nest framework (node.js) ⏰
Stars: ✭ 137 (-13.29%)
Mutual labels:  nestjs
Base App Nestjs
Base application using nest JS focused on DDD architecture and SOLID principles
Stars: ✭ 115 (-27.22%)
Mutual labels:  nestjs
Nest Permissions Seed
A simple application demonstrating the basic usage of permissions with NestJS.
Stars: ✭ 121 (-23.42%)
Mutual labels:  nestjs
Nestjs Rbac
Awesome RBAC for NestJs
Stars: ✭ 129 (-18.35%)
Mutual labels:  nestjs
Nestjs Example
NestJS example with GraphQL, Schema-Stitching, Dataloader, GraphQL Upload, RabbitMQ, Redis, Scalable Websocket and JWT authentication
Stars: ✭ 111 (-29.75%)
Mutual labels:  nestjs
Nest User Auth
A starter build for a back end which implements managing users with MongoDB, Mongoose, NestJS, Passport-JWT, and GraphQL.
Stars: ✭ 145 (-8.23%)
Mutual labels:  nestjs
Nest
A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications on top of TypeScript & JavaScript (ES6, ES7, ES8) πŸš€
Stars: ✭ 42,981 (+27103.16%)
Mutual labels:  nestjs
Elmahcore
ELMAH for Net.Standard and Net.Core
Stars: ✭ 127 (-19.62%)
Mutual labels:  errors
Domain Driven Hexagon
Guide on Domain-Driven Design, software architecture, design patterns, best practices etc.
Stars: ✭ 4,417 (+2695.57%)
Mutual labels:  nestjs
Serverless Core
Serverless Core module for Nest framework (node.js) 🦊
Stars: ✭ 154 (-2.53%)
Mutual labels:  nestjs
Nest Emitter
Strongly πŸ’ͺ🏼 Typed Eventemitter Module For Nestjs Framework 🦁
Stars: ✭ 133 (-15.82%)
Mutual labels:  nestjs

Coverage Status

Nestjs Flub

Pretty ErrorHandler 😫, Stack Viewer for Nestjs Framework πŸ› οΈ

it's just a simple Filter for Catching the Errors

Features

  1. HTML reporter

  2. JSON reporter, if request accepts a json instead of text/html.

  3. Sorted frames of error stack.

  4. Themes

Dark Theme

dark

Light Theme

light

Install

npm install nestjs-flub --save

Simple Usage

Just add this filter as you used to add any filters

import { FlubErrorHandler } from 'nestjs-flub';
@Controller('cats')
@UseFilters(new FlubErrorHandler())
export class CatsController { 

@Get('/error')
  throwError() {
    throw new Error('Very Bad Error');
  }
}

Configuration

FlubErrorHandler accepts an object as an option to configure the Error Handler for now it only have two Options

theme: string; // for themes ['dark', 'light', 'default']
quote: boolean; // for displaying  very good quotes

example

@UseFilters(new FlubErrorHandler({ theme: 'dark', quote:true }))

Theming

copy /src/themes/error.default.mustache and play

TODO

  • [ ] Write Tests
  • [ ] list syntax required

Contributing

You are welcome with this project for contributing, If you have new themes just make a new PR with and simple image for the theme

Global filters

Use flub error handler for all controllers

async function bootstrap() {
  const app = await NestFactory.create(ApplicationModule);
  app.useGlobalFilters(new FlubErrorHandler());
  await app.listen(3000);
}
bootstrap();
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].