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 March 9, 2024 12:03
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