badmfck-api-server 4.1.13 → 4.1.14

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.
@@ -98,7 +98,7 @@ async function Initializer(services) {
98
98
  }
99
99
  exports.Initializer = Initializer;
100
100
  class APIService extends BaseService_1.BaseService {
101
- version = "4.1.13";
101
+ version = "4.1.14";
102
102
  options;
103
103
  monitor = null;
104
104
  started = new Date();
@@ -331,6 +331,10 @@ class APIService extends BaseService_1.BaseService {
331
331
  respond({ error: { ...DefaultErrors_1.default.DB_ERROR, details: e.message } });
332
332
  return;
333
333
  }
334
+ if (DefaultErrors_1.ErrorUtils.isError(e)) {
335
+ respond({ error: e });
336
+ return;
337
+ }
334
338
  respond({ error: { code: 10002, message: "Internal server error!", stack: stack, details: details }, data: null, httpStatus: 500 });
335
339
  return;
336
340
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "4.1.13",
3
+ "version": "4.1.14",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",