Skip to content

Instantly share code, notes, and snippets.

View jmalins's full-sized avatar

Jeff Malins jmalins

  • Curisium, Inc.
  • Los Angeles, CA
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