{"repo":"ehmicky/modern-errors","free":true,"listed":false,"github":"https://github.com/ehmicky/modern-errors","clone":"git clone https://github.com/ehmicky/modern-errors.git","description":"Handle errors in a simple, stable, consistent way","language":"JavaScript","stars":1485,"topics":["browser","cause","code-quality","error","error-handler","error-handling","error-monitoring","error-reporting","errors","exceptions"],"license":"MIT","category":"dev-tools","readme_excerpt":"Handle errors in a simple, stable, consistent way. Features Simple patterns to: - ⛑️ Create error classes - 🏷️ Set error properties - 🎀 Wrap or aggregate errors - 🐞 Separate known and unknown errors Stability: - 🚨 Normalize invalid errors - 🛡️ 100% test coverage - 🤓 Strict TypeScript types Plugins - modern-errors-cli : Handle errors in CLI modules - modern-errors-beautiful : Prettify error messages and stacks - modern-errors-process : Handle process errors - modern-errors-bugs : Print where to report bugs - modern-errors-serialize : Serialize/parse errors - modern-errors-clean : Clean stack traces - modern-errors-http : Create HTTP error responses - modern-errors-winston : Log errors with Winston - modern-errors-switch : Execute class-specific logic - 🔌 Create your own plugin Example Create error classes. Set error properties. Wrap errors. Normalize errors. Use plugins. Install If any plugin is used, it must also be installed. This package works in both Node.js =18.18.0 and browsers. This is an ES module. It must be loaded using an import or import() statement, not require() . If TypeScript is used, it must be configured to output ES modules, not CommonJS. Usage ⛑️ Error classes Create error classes Export error classes Exporting and documenting all error classes allows consumers to check them. This also enables sharing error classes between modules. Check error classes Error subclasses ErrorClass.subclass() returns a subclass. Parent classes' options are merged with t","default_branch":null,"files":null,"tree":[],"storefront":"/r/ehmicky","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ehmicky/modern-errors/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}