error-handling
Node.js Error Handling Skill
Master error handling patterns for building resilient Node.js applications that fail gracefully and provide meaningful feedback.
Quick Start
Error handling in 4 layers:
- Custom Error Classes - Typed, informative errors
- Try/Catch Patterns - Sync and async handling
- Express Middleware - Centralized API errors
- Process Handlers - Uncaught exceptions
Core Concepts
Custom Error Classes
// Base application error
class AppError extends Error {
constructor(message, statusCode, code) {
More from pluginagentmarketplace/custom-plugin-nodejs
express-rest-api
Build production-ready RESTful APIs with Express.js including routing, middleware, validation, and error handling for scalable backend services
573mongoose-mongodb
Work with MongoDB in Node.js using Mongoose ODM for schema design, CRUD operations, relationships, and advanced queries
502docker-deployment
Containerize and deploy Node.js applications with Docker including multi-stage builds, Docker Compose, and production optimization
381jwt-authentication
Implement secure JWT (JSON Web Token) authentication in Node.js applications with access/refresh tokens and role-based access control
133jest-testing
Test Node.js applications with Jest including unit tests, integration tests, mocking, code coverage, and CI/CD integration
93async-patterns
Master asynchronous programming in Node.js with Promises, async/await, streams, and event-driven patterns for efficient non-blocking operations
82