@konplit-services/common 1.0.208 → 1.0.209

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.
@@ -4,14 +4,16 @@ import { ErrorReturn } from "./error.interface";
4
4
  export declare class GatewayError extends CustomError {
5
5
  message: string;
6
6
  private error_data;
7
+ private gatewayaResponse?;
7
8
  readonly statusCode = 502;
8
- constructor(message: string, error_data: ErrorReturn);
9
+ constructor(message: string, error_data: ErrorReturn, gatewayaResponse?: string | undefined);
9
10
  sequalizeErrors(): {
10
11
  status: Status;
11
12
  errors: {
12
13
  message: string;
13
14
  code: number;
14
15
  error_code: string;
16
+ gatewayaResponse: string | undefined;
15
17
  }[];
16
18
  };
17
19
  }
@@ -4,10 +4,11 @@ exports.GatewayError = void 0;
4
4
  const status_1 = require("../helper/status");
5
5
  const custom_error_1 = require("./custom-error");
6
6
  class GatewayError extends custom_error_1.CustomError {
7
- constructor(message, error_data) {
7
+ constructor(message, error_data, gatewayaResponse) {
8
8
  super(message);
9
9
  this.message = message;
10
10
  this.error_data = error_data;
11
+ this.gatewayaResponse = gatewayaResponse;
11
12
  this.statusCode = 502;
12
13
  this.error_data = error_data;
13
14
  Object.setPrototypeOf(this, GatewayError.prototype);
@@ -20,6 +21,7 @@ class GatewayError extends custom_error_1.CustomError {
20
21
  message: this.message,
21
22
  code: this.error_data.code,
22
23
  error_code: this.error_data.error_code,
24
+ gatewayaResponse: this.gatewayaResponse,
23
25
  },
24
26
  ],
25
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.208",
3
+ "version": "1.0.209",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",