Skip to content

Instantly share code, notes, and snippets.

View negherbon's full-sized avatar
🏠
Working from home

Rafael Negherbon negherbon

🏠
Working from home
View GitHub Profile
@slavafomin
slavafomin / nodejs-custom-es6-errors.md
Last active November 14, 2024 11:23
Custom ES6 errors in Node.js

Here's how you could create custom error classes in Node.js using latest ES6 / ES2015 syntax.

I've tried to make it as lean and unobtrusive as possible.

Defining our own base class for errors

errors/AppError.js