@yolo-croket-dev/core 1.8.8 → 1.9.1
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/exceptions/bad-request.d.ts +4 -2
- package/exceptions/bad-request.js +2 -1
- package/exceptions/conflict.d.ts +4 -2
- package/exceptions/conflict.js +2 -1
- package/exceptions/forbidden.d.ts +4 -2
- package/exceptions/forbidden.js +2 -1
- package/exceptions/gone.d.ts +4 -2
- package/exceptions/gone.js +2 -1
- package/exceptions/index.d.ts +0 -1
- package/exceptions/index.js +0 -1
- package/exceptions/internal-server-error.d.ts +4 -2
- package/exceptions/internal-server-error.js +2 -1
- package/exceptions/method-not-allowed.d.ts +4 -2
- package/exceptions/method-not-allowed.js +2 -1
- package/exceptions/not-acceptable.d.ts +4 -2
- package/exceptions/not-acceptable.js +2 -1
- package/exceptions/not-found.d.ts +4 -2
- package/exceptions/not-found.js +2 -1
- package/exceptions/server-pause-exception.d.ts +4 -2
- package/exceptions/server-pause-exception.js +2 -1
- package/exceptions/unauthorized.d.ts +4 -2
- package/exceptions/unauthorized.js +2 -1
- package/interceptors/logging-service.interceptor.js +1 -0
- package/interfaces/index.d.ts +1 -0
- package/interfaces/index.js +1 -0
- package/interfaces/log-level.enum.d.ts +20 -0
- package/interfaces/log-level.enum.js +24 -0
- package/interfaces/msa-exception.d.ts +11 -0
- package/package.json +2 -2
- package/exceptions/custom-exception.d.ts +0 -5
- package/exceptions/custom-exception.js +0 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpException } from '@nestjs/common';
|
|
2
2
|
import { ErrAction } from '../interfaces/exception';
|
|
3
|
-
import { MsaException } from '../interfaces/msa-exception';
|
|
3
|
+
import { MsaException, MsaExceptionOption } from '../interfaces/msa-exception';
|
|
4
4
|
export declare class BadRequest extends HttpException implements MsaException {
|
|
5
5
|
subMessage: string | null;
|
|
6
6
|
errType: string | null;
|
|
@@ -8,5 +8,7 @@ export declare class BadRequest extends HttpException implements MsaException {
|
|
|
8
8
|
errAction: ErrAction | null;
|
|
9
9
|
/** 해당 에러시 재시도 여부 */
|
|
10
10
|
isRetry?: boolean;
|
|
11
|
-
|
|
11
|
+
/** 에러 옵션 */
|
|
12
|
+
errOption?: MsaExceptionOption;
|
|
13
|
+
constructor(errType: string, errMessage?: string, errAction?: ErrAction, isRetry?: boolean, errOption?: MsaExceptionOption);
|
|
12
14
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BadRequest = void 0;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
5
|
class BadRequest extends common_1.HttpException {
|
|
6
|
-
constructor(errType, errMessage, errAction, isRetry) {
|
|
6
|
+
constructor(errType, errMessage, errAction, isRetry, errOption) {
|
|
7
7
|
super(errType, common_1.HttpStatus.BAD_REQUEST);
|
|
8
8
|
// legacy
|
|
9
9
|
this.subMessage = null;
|
|
@@ -17,6 +17,7 @@ class BadRequest extends common_1.HttpException {
|
|
|
17
17
|
this.errMessage = errMessage || null;
|
|
18
18
|
this.errAction = errAction || null;
|
|
19
19
|
this.isRetry = isRetry;
|
|
20
|
+
this.errOption = errOption;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
exports.BadRequest = BadRequest;
|
package/exceptions/conflict.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpException } from '@nestjs/common';
|
|
2
2
|
import { ErrAction } from '../interfaces/exception';
|
|
3
|
-
import { MsaException } from '../interfaces/msa-exception';
|
|
3
|
+
import { MsaException, MsaExceptionOption } from '../interfaces/msa-exception';
|
|
4
4
|
export declare class Conflict extends HttpException implements MsaException {
|
|
5
5
|
subMessage: string | null;
|
|
6
6
|
errType: string | null;
|
|
@@ -8,5 +8,7 @@ export declare class Conflict extends HttpException implements MsaException {
|
|
|
8
8
|
errAction: ErrAction | null;
|
|
9
9
|
/** 해당 에러시 재시도 여부 */
|
|
10
10
|
isRetry?: boolean;
|
|
11
|
-
|
|
11
|
+
/** 에러 옵션 */
|
|
12
|
+
errOption?: MsaExceptionOption;
|
|
13
|
+
constructor(errType: string, errMessage?: string, errAction?: ErrAction, isRetry?: boolean, errOption?: MsaExceptionOption);
|
|
12
14
|
}
|
package/exceptions/conflict.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Conflict = void 0;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
5
|
class Conflict extends common_1.HttpException {
|
|
6
|
-
constructor(errType, errMessage, errAction, isRetry) {
|
|
6
|
+
constructor(errType, errMessage, errAction, isRetry, errOption) {
|
|
7
7
|
super(errType, common_1.HttpStatus.CONFLICT);
|
|
8
8
|
// legacy
|
|
9
9
|
this.subMessage = null;
|
|
@@ -17,6 +17,7 @@ class Conflict extends common_1.HttpException {
|
|
|
17
17
|
this.errMessage = errMessage || null;
|
|
18
18
|
this.errAction = errAction || null;
|
|
19
19
|
this.isRetry = isRetry;
|
|
20
|
+
this.errOption = errOption;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
exports.Conflict = Conflict;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpException } from '@nestjs/common';
|
|
2
2
|
import { ErrAction } from '../interfaces/exception';
|
|
3
|
-
import { MsaException } from '../interfaces/msa-exception';
|
|
3
|
+
import { MsaException, MsaExceptionOption } from '../interfaces/msa-exception';
|
|
4
4
|
/**
|
|
5
5
|
* Forbidden 지원
|
|
6
6
|
* Type O
|
|
@@ -13,5 +13,7 @@ export declare class Forbidden extends HttpException implements MsaException {
|
|
|
13
13
|
errAction: ErrAction | null;
|
|
14
14
|
/** 해당 에러시 재시도 여부 */
|
|
15
15
|
isRetry?: boolean;
|
|
16
|
-
|
|
16
|
+
/** 에러 옵션 */
|
|
17
|
+
errOption?: MsaExceptionOption;
|
|
18
|
+
constructor(errType: string, errMessage?: string, isRetry?: boolean, errOption?: MsaExceptionOption);
|
|
17
19
|
}
|
package/exceptions/forbidden.js
CHANGED
|
@@ -8,7 +8,7 @@ const common_1 = require("@nestjs/common");
|
|
|
8
8
|
* ErrAction X
|
|
9
9
|
*/
|
|
10
10
|
class Forbidden extends common_1.HttpException {
|
|
11
|
-
constructor(errType, errMessage, isRetry) {
|
|
11
|
+
constructor(errType, errMessage, isRetry, errOption) {
|
|
12
12
|
super(errType, common_1.HttpStatus.FORBIDDEN);
|
|
13
13
|
// legacy
|
|
14
14
|
this.subMessage = null;
|
|
@@ -22,6 +22,7 @@ class Forbidden extends common_1.HttpException {
|
|
|
22
22
|
this.errMessage = errMessage || null;
|
|
23
23
|
this.errAction = null;
|
|
24
24
|
this.isRetry = isRetry;
|
|
25
|
+
this.errOption = errOption;
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
exports.Forbidden = Forbidden;
|
package/exceptions/gone.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpException } from '@nestjs/common';
|
|
2
2
|
import { ErrAction } from '../interfaces/exception';
|
|
3
|
-
import { MsaException } from '../interfaces/msa-exception';
|
|
3
|
+
import { MsaException, MsaExceptionOption } from '../interfaces/msa-exception';
|
|
4
4
|
export declare class Gone extends HttpException implements MsaException {
|
|
5
5
|
subMessage: string | null;
|
|
6
6
|
errType: string | null;
|
|
@@ -8,5 +8,7 @@ export declare class Gone extends HttpException implements MsaException {
|
|
|
8
8
|
errAction: ErrAction | null;
|
|
9
9
|
/** 해당 에러시 재시도 여부 */
|
|
10
10
|
isRetry?: boolean;
|
|
11
|
-
|
|
11
|
+
/** 에러 옵션 */
|
|
12
|
+
errOption?: MsaExceptionOption;
|
|
13
|
+
constructor(errType: string, errMessage?: string, errAction?: ErrAction, isRetry?: boolean, errOption?: MsaExceptionOption);
|
|
12
14
|
}
|
package/exceptions/gone.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Gone = void 0;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
5
|
class Gone extends common_1.HttpException {
|
|
6
|
-
constructor(errType, errMessage, errAction, isRetry) {
|
|
6
|
+
constructor(errType, errMessage, errAction, isRetry, errOption) {
|
|
7
7
|
super(errType, common_1.HttpStatus.GONE);
|
|
8
8
|
// legacy
|
|
9
9
|
this.subMessage = null;
|
|
@@ -17,6 +17,7 @@ class Gone extends common_1.HttpException {
|
|
|
17
17
|
this.errMessage = errMessage || null;
|
|
18
18
|
this.errAction = errAction || null;
|
|
19
19
|
this.isRetry = isRetry;
|
|
20
|
+
this.errOption = errOption;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
exports.Gone = Gone;
|
package/exceptions/index.d.ts
CHANGED
package/exceptions/index.js
CHANGED
|
@@ -18,7 +18,6 @@ __exportStar(require("./not-found"), exports);
|
|
|
18
18
|
__exportStar(require("./unauthorized"), exports);
|
|
19
19
|
__exportStar(require("./bad-request"), exports);
|
|
20
20
|
__exportStar(require("./internal-server-error"), exports);
|
|
21
|
-
__exportStar(require("./custom-exception"), exports);
|
|
22
21
|
__exportStar(require("./forbidden"), exports);
|
|
23
22
|
__exportStar(require("./conflict"), exports);
|
|
24
23
|
__exportStar(require("./gone"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpException } from '@nestjs/common';
|
|
2
2
|
import { ErrAction } from '../interfaces/exception';
|
|
3
|
-
import { MsaException } from '../interfaces/msa-exception';
|
|
3
|
+
import { MsaException, MsaExceptionOption } from '../interfaces/msa-exception';
|
|
4
4
|
export declare class InternalServerError extends HttpException implements MsaException {
|
|
5
5
|
subMessage: string | null;
|
|
6
6
|
errType: string | null;
|
|
@@ -8,5 +8,7 @@ export declare class InternalServerError extends HttpException implements MsaExc
|
|
|
8
8
|
errAction: ErrAction | null;
|
|
9
9
|
/** 해당 에러시 재시도 여부 */
|
|
10
10
|
isRetry?: boolean;
|
|
11
|
-
|
|
11
|
+
/** 에러 옵션 */
|
|
12
|
+
errOption?: MsaExceptionOption;
|
|
13
|
+
constructor(errType: string, errMessage?: string, errAction?: ErrAction, isRetry?: boolean, errOption?: MsaExceptionOption);
|
|
12
14
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.InternalServerError = void 0;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
5
|
class InternalServerError extends common_1.HttpException {
|
|
6
|
-
constructor(errType, errMessage, errAction, isRetry) {
|
|
6
|
+
constructor(errType, errMessage, errAction, isRetry, errOption) {
|
|
7
7
|
super(errType, common_1.HttpStatus.INTERNAL_SERVER_ERROR);
|
|
8
8
|
// legacy
|
|
9
9
|
this.subMessage = null;
|
|
@@ -17,6 +17,7 @@ class InternalServerError extends common_1.HttpException {
|
|
|
17
17
|
this.errMessage = errMessage || null;
|
|
18
18
|
this.errAction = errAction || null;
|
|
19
19
|
this.isRetry = isRetry;
|
|
20
|
+
this.errOption = errOption;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
exports.InternalServerError = InternalServerError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpException } from '@nestjs/common';
|
|
2
2
|
import { ErrAction } from '../interfaces/exception';
|
|
3
|
-
import { MsaException } from '../interfaces/msa-exception';
|
|
3
|
+
import { MsaException, MsaExceptionOption } from '../interfaces/msa-exception';
|
|
4
4
|
export declare class MethodNotAllowed extends HttpException implements MsaException {
|
|
5
5
|
subMessage: string | null;
|
|
6
6
|
errType: string | null;
|
|
@@ -8,5 +8,7 @@ export declare class MethodNotAllowed extends HttpException implements MsaExcept
|
|
|
8
8
|
errAction: ErrAction | null;
|
|
9
9
|
/** 해당 에러시 재시도 여부 */
|
|
10
10
|
isRetry?: boolean;
|
|
11
|
-
|
|
11
|
+
/** 에러 옵션 */
|
|
12
|
+
errOption?: MsaExceptionOption;
|
|
13
|
+
constructor(errType: string, errMessage?: string, errAction?: ErrAction, isRetry?: boolean, errOption?: MsaExceptionOption);
|
|
12
14
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MethodNotAllowed = void 0;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
5
|
class MethodNotAllowed extends common_1.HttpException {
|
|
6
|
-
constructor(errType, errMessage, errAction, isRetry) {
|
|
6
|
+
constructor(errType, errMessage, errAction, isRetry, errOption) {
|
|
7
7
|
super(errType, common_1.HttpStatus.METHOD_NOT_ALLOWED);
|
|
8
8
|
// legacy
|
|
9
9
|
this.subMessage = null;
|
|
@@ -17,6 +17,7 @@ class MethodNotAllowed extends common_1.HttpException {
|
|
|
17
17
|
this.errMessage = errMessage || null;
|
|
18
18
|
this.errAction = errAction || null;
|
|
19
19
|
this.isRetry = isRetry;
|
|
20
|
+
this.errOption = errOption;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
exports.MethodNotAllowed = MethodNotAllowed;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpException } from '@nestjs/common';
|
|
2
2
|
import { ErrAction } from '../interfaces/exception';
|
|
3
|
-
import { MsaException } from '../interfaces/msa-exception';
|
|
3
|
+
import { MsaException, MsaExceptionOption } from '../interfaces/msa-exception';
|
|
4
4
|
export declare class NotAcceptable extends HttpException implements MsaException {
|
|
5
5
|
subMessage: string | null;
|
|
6
6
|
errType: string | null;
|
|
@@ -8,5 +8,7 @@ export declare class NotAcceptable extends HttpException implements MsaException
|
|
|
8
8
|
errAction: ErrAction | null;
|
|
9
9
|
/** 해당 에러시 재시도 여부 */
|
|
10
10
|
isRetry?: boolean;
|
|
11
|
-
|
|
11
|
+
/** 에러 옵션 */
|
|
12
|
+
errOption?: MsaExceptionOption;
|
|
13
|
+
constructor(errType: string, errMessage?: string, errAction?: ErrAction, isRetry?: boolean, errOption?: MsaExceptionOption);
|
|
12
14
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NotAcceptable = void 0;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
5
|
class NotAcceptable extends common_1.HttpException {
|
|
6
|
-
constructor(errType, errMessage, errAction, isRetry) {
|
|
6
|
+
constructor(errType, errMessage, errAction, isRetry, errOption) {
|
|
7
7
|
// legacy
|
|
8
8
|
super(errType, common_1.HttpStatus.NOT_ACCEPTABLE);
|
|
9
9
|
// legacy
|
|
@@ -18,6 +18,7 @@ class NotAcceptable extends common_1.HttpException {
|
|
|
18
18
|
this.errMessage = errMessage || null;
|
|
19
19
|
this.errAction = errAction || null;
|
|
20
20
|
this.isRetry = isRetry;
|
|
21
|
+
this.errOption = errOption;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
exports.NotAcceptable = NotAcceptable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpException } from '@nestjs/common';
|
|
2
2
|
import { ErrAction } from '../interfaces/exception';
|
|
3
|
-
import { MsaException } from '../interfaces/msa-exception';
|
|
3
|
+
import { MsaException, MsaExceptionOption } from '../interfaces/msa-exception';
|
|
4
4
|
export declare class NotFound extends HttpException implements MsaException {
|
|
5
5
|
subMessage: string | null;
|
|
6
6
|
errType: string | null;
|
|
@@ -8,5 +8,7 @@ export declare class NotFound extends HttpException implements MsaException {
|
|
|
8
8
|
errAction: ErrAction | null;
|
|
9
9
|
/** 해당 에러시 재시도 여부 */
|
|
10
10
|
isRetry?: boolean;
|
|
11
|
-
|
|
11
|
+
/** 에러 옵션 */
|
|
12
|
+
errOption?: MsaExceptionOption;
|
|
13
|
+
constructor(errType: string, errMessage?: string, errAction?: ErrAction, isRetry?: boolean, errOption?: MsaExceptionOption);
|
|
12
14
|
}
|
package/exceptions/not-found.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NotFound = void 0;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
5
|
class NotFound extends common_1.HttpException {
|
|
6
|
-
constructor(errType, errMessage, errAction, isRetry) {
|
|
6
|
+
constructor(errType, errMessage, errAction, isRetry, errOption) {
|
|
7
7
|
super(errType, common_1.HttpStatus.NOT_FOUND);
|
|
8
8
|
// legacy
|
|
9
9
|
this.subMessage = null;
|
|
@@ -17,6 +17,7 @@ class NotFound extends common_1.HttpException {
|
|
|
17
17
|
this.errMessage = errMessage || null;
|
|
18
18
|
this.errAction = errAction || null;
|
|
19
19
|
this.isRetry = isRetry;
|
|
20
|
+
this.errOption = errOption;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
exports.NotFound = NotFound;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { HttpException } from '@nestjs/common';
|
|
2
2
|
import { ErrAction } from '../interfaces/exception';
|
|
3
|
-
import { MsaException } from '../interfaces/msa-exception';
|
|
3
|
+
import { MsaException, MsaExceptionOption } from '../interfaces/msa-exception';
|
|
4
4
|
export declare class ServerPauseException extends HttpException implements MsaException {
|
|
5
5
|
errType: string | null;
|
|
6
6
|
errMessage: string | null;
|
|
7
7
|
errAction: ErrAction | null;
|
|
8
|
-
|
|
8
|
+
/** 에러 옵션 */
|
|
9
|
+
errOption?: MsaExceptionOption;
|
|
10
|
+
constructor(serverPauseTitle: string, serverPauseMessage: string, errOption?: MsaExceptionOption);
|
|
9
11
|
}
|
|
@@ -4,7 +4,7 @@ exports.ServerPauseException = void 0;
|
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
5
|
const exception_1 = require("../interfaces/exception");
|
|
6
6
|
class ServerPauseException extends common_1.HttpException {
|
|
7
|
-
constructor(serverPauseTitle, serverPauseMessage) {
|
|
7
|
+
constructor(serverPauseTitle, serverPauseMessage, errOption) {
|
|
8
8
|
super('SERVER_PAUSE_EXCEPTION', common_1.HttpStatus.SERVICE_UNAVAILABLE);
|
|
9
9
|
this.errType = null;
|
|
10
10
|
this.errMessage = null;
|
|
@@ -16,6 +16,7 @@ class ServerPauseException extends common_1.HttpException {
|
|
|
16
16
|
serverPauseTitle,
|
|
17
17
|
serverPauseMessage,
|
|
18
18
|
};
|
|
19
|
+
this.errOption = errOption;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
exports.ServerPauseException = ServerPauseException;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpException } from '@nestjs/common';
|
|
2
2
|
import { ErrAction } from '../interfaces/exception';
|
|
3
|
-
import { MsaException } from '../interfaces/msa-exception';
|
|
3
|
+
import { MsaException, MsaExceptionOption } from '../interfaces/msa-exception';
|
|
4
4
|
/**
|
|
5
5
|
* UnAuthorized 지원
|
|
6
6
|
* Type X
|
|
@@ -11,5 +11,7 @@ export declare class UnAuthorized extends HttpException implements MsaException
|
|
|
11
11
|
errType: string | null;
|
|
12
12
|
errMessage: string | null;
|
|
13
13
|
errAction: ErrAction | null;
|
|
14
|
-
|
|
14
|
+
/** 에러 옵션 */
|
|
15
|
+
errOption?: MsaExceptionOption;
|
|
16
|
+
constructor(errMessage?: string, errAction?: ErrAction, errOption?: MsaExceptionOption);
|
|
15
17
|
}
|
|
@@ -8,7 +8,7 @@ const common_1 = require("@nestjs/common");
|
|
|
8
8
|
* ErrAction X
|
|
9
9
|
*/
|
|
10
10
|
class UnAuthorized extends common_1.HttpException {
|
|
11
|
-
constructor(errMessage, errAction) {
|
|
11
|
+
constructor(errMessage, errAction, errOption) {
|
|
12
12
|
super('USER_AUTHENTICATION_FAIL', common_1.HttpStatus.UNAUTHORIZED);
|
|
13
13
|
// legacy
|
|
14
14
|
this.subMessage = null;
|
|
@@ -21,6 +21,7 @@ class UnAuthorized extends common_1.HttpException {
|
|
|
21
21
|
this.errType = 'USER_AUTHENTICATION_FAIL';
|
|
22
22
|
this.errMessage = errMessage || null;
|
|
23
23
|
this.errAction = errAction || null;
|
|
24
|
+
this.errOption = errOption;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
exports.UnAuthorized = UnAuthorized;
|
|
@@ -153,6 +153,7 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
153
153
|
message: error.subMessage ? error.subMessage : error.message,
|
|
154
154
|
status: error.status,
|
|
155
155
|
stack: error.stack,
|
|
156
|
+
errOption: error.errOption,
|
|
156
157
|
},
|
|
157
158
|
messageBrokerInfo: {
|
|
158
159
|
messagePatten: content.pattern,
|
package/interfaces/index.d.ts
CHANGED
package/interfaces/index.js
CHANGED
|
@@ -18,4 +18,5 @@ __exportStar(require("./http"), exports);
|
|
|
18
18
|
__exportStar(require("./decorator"), exports);
|
|
19
19
|
__exportStar(require("./exception"), exports);
|
|
20
20
|
__exportStar(require("./amqp"), exports);
|
|
21
|
+
__exportStar(require("./log-level.enum"), exports);
|
|
21
22
|
__exportStar(require("./msa-exception"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author jun
|
|
3
|
+
* @description 로그 레벨을 정의하는 enum
|
|
4
|
+
* @process
|
|
5
|
+
* - MSA 로깅 시스템에서 사용되는 로그 레벨 정의
|
|
6
|
+
* - @yolo-croket-dev/msa-logger의 LogLevelEnum과 동일한 값 유지
|
|
7
|
+
*
|
|
8
|
+
* @important
|
|
9
|
+
* - 이 enum은 @yolo-croket-dev/msa-logger의 LogLevelEnum과 값이 정확히 일치해야 합니다
|
|
10
|
+
* - 순환 의존성 해결을 위해 core 패키지에 중복 정의되었습니다
|
|
11
|
+
* - msa-logger 패키지의 LogLevelEnum 값 변경 시 이 파일도 함께 업데이트해야 합니다
|
|
12
|
+
*
|
|
13
|
+
* @see packages/msa-logger/src/interfaces/msa-logger.interface.ts - 원본 정의
|
|
14
|
+
*/
|
|
15
|
+
export declare enum LogLevelEnum {
|
|
16
|
+
INFO = "info",
|
|
17
|
+
DEBUG = "debug",
|
|
18
|
+
WARN = "warn",
|
|
19
|
+
ERROR = "error"
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogLevelEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @author jun
|
|
6
|
+
* @description 로그 레벨을 정의하는 enum
|
|
7
|
+
* @process
|
|
8
|
+
* - MSA 로깅 시스템에서 사용되는 로그 레벨 정의
|
|
9
|
+
* - @yolo-croket-dev/msa-logger의 LogLevelEnum과 동일한 값 유지
|
|
10
|
+
*
|
|
11
|
+
* @important
|
|
12
|
+
* - 이 enum은 @yolo-croket-dev/msa-logger의 LogLevelEnum과 값이 정확히 일치해야 합니다
|
|
13
|
+
* - 순환 의존성 해결을 위해 core 패키지에 중복 정의되었습니다
|
|
14
|
+
* - msa-logger 패키지의 LogLevelEnum 값 변경 시 이 파일도 함께 업데이트해야 합니다
|
|
15
|
+
*
|
|
16
|
+
* @see packages/msa-logger/src/interfaces/msa-logger.interface.ts - 원본 정의
|
|
17
|
+
*/
|
|
18
|
+
var LogLevelEnum;
|
|
19
|
+
(function (LogLevelEnum) {
|
|
20
|
+
LogLevelEnum["INFO"] = "info";
|
|
21
|
+
LogLevelEnum["DEBUG"] = "debug";
|
|
22
|
+
LogLevelEnum["WARN"] = "warn";
|
|
23
|
+
LogLevelEnum["ERROR"] = "error";
|
|
24
|
+
})(LogLevelEnum || (exports.LogLevelEnum = LogLevelEnum = {}));
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { HttpException } from '@nestjs/common';
|
|
2
|
+
import { LogLevelEnum } from './log-level.enum';
|
|
2
3
|
import { ErrAction } from './exception';
|
|
4
|
+
export interface MsaExceptionOption {
|
|
5
|
+
/**
|
|
6
|
+
* 로그 레벨
|
|
7
|
+
* - 에러 처리 시 로그 레벨을 설정할 수 있습니다.
|
|
8
|
+
* - 기본값은 ERROR 입니다.
|
|
9
|
+
* */
|
|
10
|
+
logErrorLevel?: LogLevelEnum;
|
|
11
|
+
}
|
|
3
12
|
/**
|
|
4
13
|
* @author jun
|
|
5
14
|
* @description MSA 아키텍처에서 사용하는 공통 예외 인터페이스
|
|
@@ -14,6 +23,8 @@ export interface MsaException {
|
|
|
14
23
|
errAction: ErrAction | null;
|
|
15
24
|
/** 재시도 가능 여부 */
|
|
16
25
|
isRetry?: boolean;
|
|
26
|
+
/** 에러 옵션 */
|
|
27
|
+
errOption?: MsaExceptionOption;
|
|
17
28
|
}
|
|
18
29
|
/** HttpException과 MsaException을 결합한 타입 */
|
|
19
30
|
export type MsaHttpException = MsaException & HttpException;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolo-croket-dev/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"author": "Yolo Co., Ltd.",
|
|
5
5
|
"description": "Yolo commonization module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@yolo-croket-dev/logger": "^1.0.15",
|
|
25
|
-
"@yolo-croket-dev/msa-logger": "^3.
|
|
25
|
+
"@yolo-croket-dev/msa-logger": "^3.5.0",
|
|
26
26
|
"@yolo-croket-dev/redis": "^1.0.25",
|
|
27
27
|
"axios": "^1.1.3",
|
|
28
28
|
"randomstring": "^1.2.2",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CustomException = void 0;
|
|
4
|
-
const common_1 = require("@nestjs/common");
|
|
5
|
-
class CustomException extends common_1.HttpException {
|
|
6
|
-
constructor(status, body) {
|
|
7
|
-
super(body, status);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.CustomException = CustomException;
|