From 7efdbf38e42b4f1e400b208ccaf9cc02a7ffe9d1 Mon Sep 17 00:00:00 2001 From: cany748 Date: Wed, 28 Feb 2024 16:27:33 +0700 Subject: [PATCH] fix: revert ServerError.js --- src/lib/ServerError.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/lib/ServerError.js diff --git a/src/lib/ServerError.js b/src/lib/ServerError.js new file mode 100644 index 00000000..1e567f4b --- /dev/null +++ b/src/lib/ServerError.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = class ServerError extends Error { + + constructor(message, statusCode = 500) { + super(message); + this.statusCode = statusCode; + } + +};