@tc-libs/errors 1.28.0 → 1.30.0

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.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@tc-libs/errors",
3
- "version": "1.28.0",
3
+ "version": "1.30.0",
4
4
  "dependencies": {
5
- "@tc-libs/error-interface": "1.28.0"
5
+ "@tc-libs/error-interface": "1.30.0"
6
6
  },
7
7
  "devDependencies": {},
8
8
  "type": "commonjs",
@@ -3,10 +3,10 @@ import { ApiError } from '../_api.error';
3
3
  declare abstract class Api503Error extends ApiError {
4
4
  hasToLogConsole: boolean;
5
5
  static readonly statusCode = HttpStatus.SERVICE_UNAVAILABLE;
6
- constructor(type: string, description?: string, data?: any);
6
+ constructor(type: string, hasToLogConsole: boolean, description?: string, data?: any);
7
7
  }
8
8
  export declare class Api503ServiceUnavailableError extends Api503Error {
9
9
  static readonly type = "error.503.service_unavailable";
10
- constructor();
10
+ constructor(hasToLogConsole?: boolean);
11
11
  }
12
12
  export {};
@@ -4,15 +4,16 @@ exports.Api503ServiceUnavailableError = void 0;
4
4
  const common_1 = require("@nestjs/common");
5
5
  const _api_error_1 = require("../_api.error");
6
6
  class Api503Error extends _api_error_1.ApiError {
7
- constructor(type, description = 'Service unavailable', data) {
7
+ constructor(type, hasToLogConsole, description = 'Service unavailable', data) {
8
8
  super(description, common_1.HttpStatus.SERVICE_UNAVAILABLE, type, data);
9
9
  this.hasToLogConsole = true;
10
+ this.hasToLogConsole = hasToLogConsole;
10
11
  }
11
12
  }
12
13
  Api503Error.statusCode = common_1.HttpStatus.SERVICE_UNAVAILABLE;
13
14
  class Api503ServiceUnavailableError extends Api503Error {
14
- constructor() {
15
- super('error.503.service_unavailable');
15
+ constructor(hasToLogConsole = true) {
16
+ super('error.503.service_unavailable', hasToLogConsole);
16
17
  }
17
18
  }
18
19
  exports.Api503ServiceUnavailableError = Api503ServiceUnavailableError;
@@ -1 +1 @@
1
- {"version":3,"file":"api.503.error.js","sourceRoot":"","sources":["../../../../../../packages/errors/src/api/503/api.503.error.ts"],"names":[],"mappings":";;;AAAA,2CAA4C;AAC5C,8CAAyC;AAEzC,MAAe,WAAY,SAAQ,qBAAQ;IAIzC,YAAY,IAAY,EAAE,WAAW,GAAG,qBAAqB,EAAE,IAAU;QACvE,KAAK,CAAC,WAAW,EAAE,mBAAU,CAAC,mBAAmB,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAJxD,oBAAe,GAAG,IAAI,CAAC;IAKhC,CAAC;;AAJe,sBAAU,GAAG,mBAAU,CAAC,mBAAmB,AAAjC,CAAkC;AAO9D,MAAa,6BAA8B,SAAQ,WAAW;IAE5D;QACE,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACzC,CAAC;;AAJH,sEAKC;AAJiB,kCAAI,GAAG,+BAA+B,CAAC"}
1
+ {"version":3,"file":"api.503.error.js","sourceRoot":"","sources":["../../../../../../packages/errors/src/api/503/api.503.error.ts"],"names":[],"mappings":";;;AAAA,2CAA4C;AAC5C,8CAAyC;AAEzC,MAAe,WAAY,SAAQ,qBAAQ;IAIzC,YACE,IAAY,EACZ,eAAwB,EACxB,WAAW,GAAG,qBAAqB,EACnC,IAAU;QAEV,KAAK,CAAC,WAAW,EAAE,mBAAU,CAAC,mBAAmB,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QATxD,oBAAe,GAAG,IAAI,CAAC;QAU9B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;;AAVe,sBAAU,GAAG,mBAAU,CAAC,mBAAmB,AAAjC,CAAkC;AAa9D,MAAa,6BAA8B,SAAQ,WAAW;IAE5D,YAAY,eAAe,GAAG,IAAI;QAChC,KAAK,CAAC,+BAA+B,EAAE,eAAe,CAAC,CAAC;IAC1D,CAAC;;AAJH,sEAKC;AAJiB,kCAAI,GAAG,+BAA+B,CAAC"}