@rkticket/common 1.0.4 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
package/build/index.js CHANGED
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ //re-export stuff from errors and middlewares
17
18
  __exportStar(require("./errors/bad-request-error"), exports);
18
19
  __exportStar(require("./errors/custom-error"), exports);
19
20
  __exportStar(require("./errors/database-connection-error"), exports);
@@ -6,6 +6,7 @@ const errorHandler = (err, req, res, next) => {
6
6
  if (err instanceof custom_error_1.CustomError) {
7
7
  console.log(res.status(err.statusCode).send({ errors: err.serializeErrors() }));
8
8
  }
9
+ console.error(err);
9
10
  res.status(400).send({
10
11
  errors: [{ message: 'Something went wrong' }],
11
12
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rkticket/common",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [