@konplit-services/common 1.16.1 → 1.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,8 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.BaseRepository = void 0;
|
|
13
|
-
const errors_1 = require("../../errors");
|
|
14
|
-
const helper_1 = require("../../helper");
|
|
15
13
|
class BaseRepository {
|
|
16
14
|
constructor(model) {
|
|
17
15
|
this.Model = model;
|
|
@@ -23,7 +21,11 @@ class BaseRepository {
|
|
|
23
21
|
}
|
|
24
22
|
catch (err) {
|
|
25
23
|
console.log("Error with database", err);
|
|
26
|
-
throw
|
|
24
|
+
throw err;
|
|
25
|
+
//throw new DatabaseConnectionError(
|
|
26
|
+
// "Database unavailable. Please retry.",
|
|
27
|
+
// error_codes.DATABASE_ERROR
|
|
28
|
+
// );
|
|
27
29
|
}
|
|
28
30
|
});
|
|
29
31
|
}
|