@yolo-croket-dev/core 1.9.2-jun.2 → 1.9.3-jun.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.
@@ -1,12 +1,11 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { HttpException } from '@nestjs/common';
3
3
  import { AbstractRequest } from '..';
4
- import { ErrInfo, MsaExceptionOption } from '../interfaces';
4
+ import { ErrInfo } from '../interfaces';
5
5
  export declare class HttpExceptionCustom extends HttpException {
6
6
  errInfo?: ErrInfo | null;
7
7
  subMessage: string | null;
8
- errOption?: MsaExceptionOption | null;
9
- constructor(response: string | Record<string, any>, status: number, subMessage?: string | null, errInfo?: ErrInfo | null, errOption?: MsaExceptionOption | null);
8
+ constructor(response: string | Record<string, any>, status: number, subMessage?: string | null, errInfo?: ErrInfo | null);
10
9
  }
11
10
  export interface AbstractAmqpHandlerResponse<T> {
12
11
  message: string;
@@ -10,15 +10,13 @@ const DEFAULT_TIMEOUT = 1000 * 60 * 29; // 29분 타임아웃
10
10
  const DEFAULT_TIMEOUT_MESSAGE = '요청이 타임아웃되었습니다.';
11
11
  const msaLogger = new msa_logger_1.MsaLogger(msa_logger_1.ServerTypeEnum.SERVICE);
12
12
  class HttpExceptionCustom extends common_1.HttpException {
13
- constructor(response, status, subMessage, errInfo, errOption) {
13
+ constructor(response, status, subMessage, errInfo) {
14
14
  super(response, status);
15
15
  this.subMessage = subMessage || null;
16
16
  this.errInfo = errInfo || null;
17
- this.errOption = errOption || null;
18
17
  }
19
18
  }
20
19
  exports.HttpExceptionCustom = HttpExceptionCustom;
21
- // eslint-disable-next-line max-len
22
20
  async function AmqpHandler(client, messagePattern, payload) {
23
21
  var _a, _b, _c, _d;
24
22
  let data;
@@ -39,7 +37,6 @@ async function AmqpHandler(client, messagePattern, payload) {
39
37
  action: data.errAction,
40
38
  errOption: data.errOption,
41
39
  };
42
- const errOption = data.errOption;
43
40
  delete data.errType;
44
41
  delete data.errMessage;
45
42
  delete data.errAction;
@@ -48,7 +45,7 @@ async function AmqpHandler(client, messagePattern, payload) {
48
45
  delete data.status;
49
46
  delete data.arg;
50
47
  delete data.subMessage;
51
- throw new HttpExceptionCustom(data, status, subMessage, errInfo, errOption);
48
+ throw new HttpExceptionCustom(data, status, subMessage, errInfo);
52
49
  }
53
50
  }
54
51
  catch (err) {
@@ -207,7 +207,6 @@ let RPCInterceptor = class RPCInterceptor {
207
207
  const noAck = message.fields.routingKey.includes('ASYNC');
208
208
  let localErrorProcessor = async (err) => {
209
209
  var _a;
210
- console.log('err@@@@@@@ rpc가 있다고?', err);
211
210
  const errMsg = err.response ? err.response : err.message;
212
211
  const status = err.status ? err.status : 500;
213
212
  const errType = err.errType;
@@ -229,8 +228,9 @@ let RPCInterceptor = class RPCInterceptor {
229
228
  duration,
230
229
  arg,
231
230
  timestamp: new Date(),
232
- // new
231
+ // === Service-to-Service Error Data ===
233
232
  errInfo,
233
+ // === Service-to-Gateway Error Data ===
234
234
  errType,
235
235
  errMessage,
236
236
  errAction,
@@ -1,4 +1,4 @@
1
- import { MsaExceptionOption } from './msa-exception';
1
+ import type { MsaExceptionOption } from './msa-exception';
2
2
  export declare enum ErrActionTypeEnum {
3
3
  SERVER_PAUSE = "SERVER_PAUSE",
4
4
  OPEN_WEBVIEW = "OPEN_WEBVIEW",
@@ -1,6 +1,6 @@
1
1
  import { HttpException } from '@nestjs/common';
2
2
  import { LogLevelEnum } from './log-level.enum';
3
- import { ErrAction } from './exception';
3
+ import type { ErrAction } from './exception';
4
4
  export interface MsaExceptionOption {
5
5
  /**
6
6
  * 로그 레벨
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/core",
3
- "version": "1.9.2-jun.2",
3
+ "version": "1.9.3-jun.0",
4
4
  "author": "Yolo Co., Ltd.",
5
5
  "description": "Yolo commonization module",
6
6
  "main": "index.js",