quoting-service 17.0.5 → 17.1.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/CHANGELOG.md +14 -0
- package/package.json +2 -2
- package/src/model/fxQuotes.js +2 -2
- package/src/server.js +0 -5
- package/src/api/plugins/index.js +0 -31
- package/src/api/plugins/loggingPlugin.js +0 -78
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [17.1.1](https://github.com/mojaloop/quoting-service/compare/v17.1.0...v17.1.1) (2025-01-30)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Chore
|
|
9
|
+
|
|
10
|
+
* fixed merge to main issue ([#391](https://github.com/mojaloop/quoting-service/issues/391)) ([f54d215](https://github.com/mojaloop/quoting-service/commit/f54d215419149f7cbe3b1d058ac4fad815f08263))
|
|
11
|
+
|
|
12
|
+
## [17.1.0](https://github.com/mojaloop/quoting-service/compare/v17.0.5...v17.1.0) (2025-01-30)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **csi-927:** fixed db error - ER_BAD_FIELD_ERROR: Unknown column 'NaN' in 'field list' ([#390](https://github.com/mojaloop/quoting-service/issues/390)) ([c9fb641](https://github.com/mojaloop/quoting-service/commit/c9fb64148a626890a973ce6b47515c1b61931196))
|
|
18
|
+
|
|
5
19
|
### [17.0.5](https://github.com/mojaloop/quoting-service/compare/v17.0.4...v17.0.5) (2025-01-29)
|
|
6
20
|
|
|
7
21
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "quoting-service",
|
|
3
3
|
"description": "Quoting Service hosted by a scheme",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"version": "17.
|
|
5
|
+
"version": "17.1.1",
|
|
6
6
|
"author": "ModusBox",
|
|
7
7
|
"contributors": [
|
|
8
8
|
"Georgi Georgiev <georgi.georgiev@modusbox.com>",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"@mojaloop/central-services-health": "15.0.2",
|
|
115
115
|
"@mojaloop/central-services-logger": "11.5.4",
|
|
116
116
|
"@mojaloop/central-services-metrics": "12.4.4",
|
|
117
|
-
"@mojaloop/central-services-shared": "18.
|
|
117
|
+
"@mojaloop/central-services-shared": "18.17.0",
|
|
118
118
|
"@mojaloop/central-services-stream": "11.4.3",
|
|
119
119
|
"@mojaloop/event-sdk": "14.1.3",
|
|
120
120
|
"@mojaloop/inter-scheme-proxy-cache-lib": "2.3.1",
|
package/src/model/fxQuotes.js
CHANGED
|
@@ -593,7 +593,7 @@ class FxQuotesModel {
|
|
|
593
593
|
|
|
594
594
|
// persist the error
|
|
595
595
|
await this.db.createFxQuoteError(txn, conversionRequestId, {
|
|
596
|
-
errorCode: Number(error.errorCode),
|
|
596
|
+
errorCode: Number(error.errorCode) || 2001, // Internal Server Error: https://github.com/mojaloop/central-services-error-handling/blob/master/src/errors.js#L29
|
|
597
597
|
errorDescription: error.errorDescription
|
|
598
598
|
})
|
|
599
599
|
|
|
@@ -607,7 +607,7 @@ class FxQuotesModel {
|
|
|
607
607
|
histTimer({ success: true, queryName: 'handleFxQuoteError' })
|
|
608
608
|
} catch (err) {
|
|
609
609
|
histTimer({ success: false, queryName: 'handleFxQuoteError' })
|
|
610
|
-
this.log.error('error in handleFxQuoteError', err)
|
|
610
|
+
this.log.child({ headers, conversionRequestId, error }).error('error in handleFxQuoteError', err)
|
|
611
611
|
if (txn) {
|
|
612
612
|
await txn.rollback().catch(() => {})
|
|
613
613
|
}
|
package/src/server.js
CHANGED
|
@@ -54,7 +54,6 @@ const { failActionHandler, resolveOpenApiSpecPath } = require('../src/lib/util')
|
|
|
54
54
|
const Config = require('./lib/config')
|
|
55
55
|
const Handlers = require('./api')
|
|
56
56
|
const Routes = require('./api/routes')
|
|
57
|
-
const plugins = require('./api/plugins')
|
|
58
57
|
const dto = require('./lib/dto')
|
|
59
58
|
const { version } = require('../package.json')
|
|
60
59
|
|
|
@@ -157,10 +156,6 @@ const initServer = async function (config, topicNames) {
|
|
|
157
156
|
|
|
158
157
|
// add plugins to the server
|
|
159
158
|
await server.register([
|
|
160
|
-
{
|
|
161
|
-
plugin: plugins.loggingPlugin,
|
|
162
|
-
options: {}
|
|
163
|
-
},
|
|
164
159
|
{
|
|
165
160
|
plugin: Good,
|
|
166
161
|
options: {
|
package/src/api/plugins/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*****
|
|
2
|
-
License
|
|
3
|
-
--------------
|
|
4
|
-
Copyright © 2020-2025 Mojaloop Foundation
|
|
5
|
-
The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
10
|
-
|
|
11
|
-
Contributors
|
|
12
|
-
--------------
|
|
13
|
-
This is the official list of the Mojaloop project contributors for this file.
|
|
14
|
-
Names of the original copyright holders (individuals or organizations)
|
|
15
|
-
should be listed with a '*' in the first column. People who have
|
|
16
|
-
contributed from an organization can be listed under the organization
|
|
17
|
-
that actually holds the copyright for their contributions (see the
|
|
18
|
-
Mojaloop Foundation for an example). Those individuals should have
|
|
19
|
-
their names indented and be marked with a '-'. Email address can be added
|
|
20
|
-
optionally within square brackets <email>.
|
|
21
|
-
|
|
22
|
-
* Mojaloop Foundation
|
|
23
|
-
- Name Surname <name.surname@mojaloop.io>
|
|
24
|
-
|
|
25
|
-
*****/
|
|
26
|
-
|
|
27
|
-
const loggingPlugin = require('./loggingPlugin')
|
|
28
|
-
|
|
29
|
-
module.exports = {
|
|
30
|
-
loggingPlugin
|
|
31
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/*****
|
|
2
|
-
License
|
|
3
|
-
--------------
|
|
4
|
-
Copyright © 2020-2025 Mojaloop Foundation
|
|
5
|
-
The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
10
|
-
|
|
11
|
-
Contributors
|
|
12
|
-
--------------
|
|
13
|
-
This is the official list of the Mojaloop project contributors for this file.
|
|
14
|
-
Names of the original copyright holders (individuals or organizations)
|
|
15
|
-
should be listed with a '*' in the first column. People who have
|
|
16
|
-
contributed from an organization can be listed under the organization
|
|
17
|
-
that actually holds the copyright for their contributions (see the
|
|
18
|
-
Mojaloop Foundation for an example). Those individuals should have
|
|
19
|
-
their names indented and be marked with a '-'. Email address can be added
|
|
20
|
-
optionally within square brackets <email>.
|
|
21
|
-
|
|
22
|
-
* Mojaloop Foundation
|
|
23
|
-
- Name Surname <name.surname@mojaloop.io>
|
|
24
|
-
|
|
25
|
-
* Infitx
|
|
26
|
-
- Vijay Kumar Guthi <vijaya.guthi@infitx.com>
|
|
27
|
-
- Kevin Leyow <kevin.leyow@infitx.com>
|
|
28
|
-
- Kalin Krustev <kalin.krustev@infitx.com>
|
|
29
|
-
- Steven Oderayi <steven.oderayi@infitx.com>
|
|
30
|
-
- Eugen Klymniuk <eugen.klymniuk@infitx.com>
|
|
31
|
-
|
|
32
|
-
--------------
|
|
33
|
-
|
|
34
|
-
******/
|
|
35
|
-
|
|
36
|
-
const { asyncStorage } = require('@mojaloop/central-services-logger/src/contextLogger')
|
|
37
|
-
const { logger } = require('../../lib') // pass though options
|
|
38
|
-
|
|
39
|
-
const loggingPlugin = {
|
|
40
|
-
name: 'loggingPlugin',
|
|
41
|
-
version: '1.0.0',
|
|
42
|
-
once: true,
|
|
43
|
-
register: async (server, options) => {
|
|
44
|
-
// const { logger } = options;
|
|
45
|
-
server.ext({
|
|
46
|
-
type: 'onPreHandler',
|
|
47
|
-
method: (request, h) => {
|
|
48
|
-
const { path, method, headers, payload, query } = request
|
|
49
|
-
const { remoteAddress } = request.info
|
|
50
|
-
const requestId = request.info.id = `${request.info.id}__${headers.traceid}`
|
|
51
|
-
asyncStorage.enterWith({ requestId })
|
|
52
|
-
|
|
53
|
-
logger.isInfoEnabled && logger.info(`[==> req] ${method.toUpperCase()} ${path}`, { headers, payload, query, remoteAddress })
|
|
54
|
-
return h.continue
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
server.ext({
|
|
59
|
-
type: 'onPreResponse',
|
|
60
|
-
method: (request, h) => {
|
|
61
|
-
if (logger.isInfoEnabled) {
|
|
62
|
-
const { path, method, headers, payload, query, response } = request
|
|
63
|
-
const { received } = request.info
|
|
64
|
-
|
|
65
|
-
const statusCode = response instanceof Error
|
|
66
|
-
? response.output?.statusCode
|
|
67
|
-
: response.statusCode
|
|
68
|
-
const respTimeSec = ((Date.now() - received) / 1000).toFixed(3)
|
|
69
|
-
|
|
70
|
-
logger.info(`[<== ${statusCode}][${respTimeSec} s] ${method.toUpperCase()} ${path}`, { headers, payload, query })
|
|
71
|
-
}
|
|
72
|
-
return h.continue
|
|
73
|
-
}
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
module.exports = loggingPlugin
|