Skip to content

Instantly share code, notes, and snippets.

@loloDawit
Created November 19, 2021 01:59
Show Gist options
  • Select an option

  • Save loloDawit/91995fa298fd430d0e9a0bb9288310fc to your computer and use it in GitHub Desktop.

Select an option

Save loloDawit/91995fa298fd430d0e9a0bb9288310fc to your computer and use it in GitHub Desktop.
error.js
"use strict";
class ErrorResponse extends Error {
constructor(message, statusCode) {
super(message);
this.statusCode = statusCode;
}
}
module.exports = ErrorResponse;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment