@ticketing_dev/common 1.0.4 → 1.0.5

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.
@@ -5,7 +5,7 @@ const custom_error_js_1 = require("./custom-error.js");
5
5
  class NotAuthorizedError extends custom_error_js_1.CustomError {
6
6
  constructor() {
7
7
  super("Not authorized");
8
- this.statusCode = 410;
8
+ this.statusCode = 401;
9
9
  Object.setPrototypeOf(this, NotAuthorizedError.prototype);
10
10
  }
11
11
  serializeErrors() {
@@ -1 +1 @@
1
- {"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../src/middlewares/error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI/D,eAAO,MAAM,YAAY,GACrB,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,MAAM,YAAY,mDAWrB,CAAC"}
1
+ {"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../src/middlewares/error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI/D,eAAO,MAAM,YAAY,GACrB,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,MAAM,YAAY,mDAarB,CAAC"}
@@ -8,6 +8,8 @@ const errorHandler = (err, req, res, next) => {
8
8
  errors: err.serializeErrors()
9
9
  });
10
10
  }
11
+ ;
12
+ console.error(err);
11
13
  res.status(400).send({
12
14
  error: [{ message: 'something went wrong' }]
13
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../../src/middlewares/error-handler.ts"],"names":[],"mappings":";;;AACA,+DAAwD;AAGjD,MAAM,YAAY,GAAG,CACxB,GAAU,EACV,GAAY,EACZ,GAAa,EACb,IAAkB,EAAE,EAAE;IAEtB,IAAI,GAAG,YAAY,6BAAW,EAAE,CAAC;QAC7B,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC;YACnC,MAAM,EAAE,GAAG,CAAC,eAAe,EAAE;SAChC,CAAC,CAAA;IACN,CAAC;IAED,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;QACjB,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;KAC/C,CAAC,CAAC;AACP,CAAC,CAAC;AAfW,QAAA,YAAY,gBAevB"}
1
+ {"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../../src/middlewares/error-handler.ts"],"names":[],"mappings":";;;AACA,+DAAwD;AAGjD,MAAM,YAAY,GAAG,CACxB,GAAU,EACV,GAAY,EACZ,GAAa,EACb,IAAkB,EAAE,EAAE;IAEtB,IAAI,GAAG,YAAY,6BAAW,EAAE,CAAC;QAC7B,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC;YACnC,MAAM,EAAE,GAAG,CAAC,eAAe,EAAE;SAChC,CAAC,CAAA;IACN,CAAC;IAAA,CAAC;IAEF,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEnB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;QACjB,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;KAC/C,CAAC,CAAC;AACP,CAAC,CAAC;AAjBW,QAAA,YAAY,gBAiBvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticketing_dev/common",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",