Compare View
Commits (2)
Changes
Showing 4 changed files Side-by-side Diff
CHANGELOG.md
... | ... | @@ -4,8 +4,14 @@ All notable changes to this project will be documented in this file. Dates are d |
4 | 4 | |
5 | 5 | Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). |
6 | 6 | |
7 | +#### [v1.46.6](https://gitlab.kodesumber.com/komodo/komodo-sdk/compare/v1.46.5...v1.46.6) | |
8 | + | |
9 | +- Fix missing res.end on advice [`fcdd7c6`](https://gitlab.kodesumber.com/komodo/komodo-sdk/commit/fcdd7c6dce7e8b1edce4e33d23e12eba70964bf5) | |
10 | + | |
7 | 11 | #### [v1.46.5](https://gitlab.kodesumber.com/komodo/komodo-sdk/compare/v1.46.4...v1.46.5) |
8 | 12 | |
13 | +> 9 September 2025 | |
14 | + | |
9 | 15 | - URGENT: Stringify misc report if not string [`6e12666`](https://gitlab.kodesumber.com/komodo/komodo-sdk/commit/6e126667faae74a4426a86db02fbd1841b0b90d8) |
10 | 16 | |
11 | 17 | #### [v1.46.4](https://gitlab.kodesumber.com/komodo/komodo-sdk/compare/v1.46.3...v1.46.4) |
gateway/advice-push-server.js
... | ... | @@ -32,6 +32,8 @@ function setPartner(_partner) { |
32 | 32 | } |
33 | 33 | |
34 | 34 | function isValidApikey(req, res, next) { |
35 | + const { xid } = res.locals; | |
36 | + | |
35 | 37 | if ( |
36 | 38 | config.push_server |
37 | 39 | && config.push_server.apikey |
... | ... | @@ -39,19 +41,22 @@ function isValidApikey(req, res, next) { |
39 | 41 | ) { |
40 | 42 | next(); |
41 | 43 | } else { |
44 | + logger.verbose(`${MODULE_NAME} 22222BF5: Invalid APIKEY`, { xid }); | |
42 | 45 | res.end('INVALID_APIKEY'); |
43 | 46 | } |
44 | 47 | } |
45 | 48 | |
46 | 49 | function adviceHandler(req, res) { |
50 | + const { xid } = res.locals; | |
51 | + | |
47 | 52 | if (!partner) { |
48 | - logger.warn(`${MODULE_NAME} 58FACCD9: Undefined partner, skipped`); | |
53 | + logger.warn(`${MODULE_NAME} 58FACCD9: Undefined partner, skipped`, { xid }); | |
49 | 54 | res.end('UNDEFINED_PARTNER'); |
50 | 55 | return; |
51 | 56 | } |
52 | 57 | |
53 | 58 | if (!partner.advice) { |
54 | - logger.warn(`${MODULE_NAME} 73E745A0: Partner does not have ADVICE capabilities`); | |
59 | + logger.warn(`${MODULE_NAME} 73E745A0: Partner does not have ADVICE capabilities`, { xid }); | |
55 | 60 | res.end('UNSUPPORTED'); |
56 | 61 | return; |
57 | 62 | } |
... | ... | @@ -59,12 +64,14 @@ function adviceHandler(req, res) { |
59 | 64 | const task = req.body; |
60 | 65 | |
61 | 66 | if (!task || !task.trx_id || !task.destination || !task.product) { |
62 | - logger.warn(`${MODULE_NAME} DABD50A5: Invalid task`); | |
67 | + logger.warn(`${MODULE_NAME} DABD50A5: Invalid task`, { xid, task }); | |
63 | 68 | res.end('INVALID_TASK'); |
64 | 69 | return; |
65 | 70 | } |
66 | 71 | |
67 | - logger.verbose(`${MODULE_NAME} DB27D06B: Got advice push`, { task }); | |
72 | + res.end('OK'); | |
73 | + | |
74 | + logger.verbose(`${MODULE_NAME} DB27D06B: Got advice push`, { xid, task }); | |
68 | 75 | |
69 | 76 | task.remote_product = pull.getRemoteProduct(task.product); |
70 | 77 | if (Number(config.sdk_trx_id_adder)) { |
package-lock.json
1 | 1 | { |
2 | 2 | "name": "komodo-sdk", |
3 | - "version": "1.46.5", | |
3 | + "version": "1.46.6", | |
4 | 4 | "lockfileVersion": 2, |
5 | 5 | "requires": true, |
6 | 6 | "packages": { |
7 | 7 | "": { |
8 | 8 | "name": "komodo-sdk", |
9 | - "version": "1.46.5", | |
9 | + "version": "1.46.6", | |
10 | 10 | "license": "ISC", |
11 | 11 | "dependencies": { |
12 | 12 | "array-unique": "^0.3.2", |