This package provides simple and structured custom error classes (`ClientError`, `ServerError`) and a global error handler (`globalError`) for consistent error responses in your Node.js or Express.js applications.
npm install shokhijakhon-error-handlerClientError, ServerError) and a global error handler (globalError) for consistent error responses in your Node.js or Express.js applications.
ClientError: for user-induced errors (e.g. bad requests, unauthorized, etc.)
ServerError: for internal server errors
globalError: centralized error handling for consistent API responses
error.js file directly into your project or use it as a local module.