@yolo-croket-dev/core 1.7.26-slowquery.0 → 1.7.26-slowquery.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.
|
@@ -22,15 +22,7 @@ async function AmqpHandler(client, messagePattern, payload) {
|
|
|
22
22
|
var _a, _b, _c;
|
|
23
23
|
let data;
|
|
24
24
|
try {
|
|
25
|
-
data = await (0, rxjs_1.lastValueFrom)(client.send(messagePattern, payload).pipe((0, operators_1.timeout)(DEFAULT_TIMEOUT)
|
|
26
|
-
if (err.message === DEFAULT_TIMEOUT_MESSAGE) {
|
|
27
|
-
throw new HttpExceptionCustom(DEFAULT_TIMEOUT_MESSAGE, 500, DEFAULT_TIMEOUT_MESSAGE, {
|
|
28
|
-
type: 'AMQP_HANDLER_TIMEOUT',
|
|
29
|
-
message: DEFAULT_TIMEOUT_MESSAGE,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
throw err;
|
|
33
|
-
})));
|
|
25
|
+
data = await (0, rxjs_1.lastValueFrom)(client.send(messagePattern, payload).pipe((0, operators_1.timeout)(DEFAULT_TIMEOUT)));
|
|
34
26
|
if (data.isError) {
|
|
35
27
|
const status = data.status || 500;
|
|
36
28
|
const subMessage = data.subMessage;
|
|
@@ -62,6 +54,12 @@ async function AmqpHandler(client, messagePattern, payload) {
|
|
|
62
54
|
message: `${messagePattern} 해당 메시지 패턴은 존재하지 않습니다.`,
|
|
63
55
|
});
|
|
64
56
|
}
|
|
57
|
+
else if (err instanceof rxjs_1.TimeoutError || err.message === DEFAULT_TIMEOUT_MESSAGE) {
|
|
58
|
+
throw new HttpExceptionCustom(DEFAULT_TIMEOUT_MESSAGE, 500, DEFAULT_TIMEOUT_MESSAGE, {
|
|
59
|
+
type: 'TIMEOUT_ERROR',
|
|
60
|
+
message: DEFAULT_TIMEOUT_MESSAGE,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
65
63
|
else {
|
|
66
64
|
msaLogger.error('AMQP_HANDLER_ERROR', { traceId: ((_c = payload === null || payload === void 0 ? void 0 : payload.param) === null || _c === void 0 ? void 0 : _c.traceId) || '-' }, { err });
|
|
67
65
|
throw err;
|