From c8af7c57864e8ac43b46a9dbd35e662aafbf1e28 Mon Sep 17 00:00:00 2001 From: Olojakpoke Daniel Date: Thu, 3 Nov 2022 03:03:53 +0100 Subject: [PATCH] fix: trigger deployment --- server/utils/HttpError.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/utils/HttpError.js b/server/utils/HttpError.js index 908f303a..5e9b8422 100644 --- a/server/utils/HttpError.js +++ b/server/utils/HttpError.js @@ -1,12 +1,12 @@ /* - * To define a extended error for API, can pass through the error message, http - * code, to bring some convenient for the internal class to throw out the error - * and the outside of the layer can catch the error and convert to a http + * To define a extended error for API, can pass through the error message, http + * code, to bring some convenient for the internal class to throw out the error + * and the outside of the layer can catch the error and convert to a http * response to client */ class HttpError extends Error { - constructor(code, message, toRollback){ + constructor(code, message, toRollback) { super(message); this.code = code; // set rollback flag, so the transaction of db would rollback when catch this error @@ -14,7 +14,7 @@ class HttpError extends Error { this._toRollback = toRollback || true; } - shouldRollback(){ + shouldRollback() { return this._toRollback; } }