Skip to content

Commit

Permalink
feat(csi-927): fixed db error - ER_BAD_FIELD_ERROR: Unknown column 'N…
Browse files Browse the repository at this point in the history
…aN' in 'field list' (#390)

feat(csi-927): fixed db error
- ER_BAD_FIELD_ERROR: Unknown column 'NaN' in 'field list'
  • Loading branch information
geka-evk authored Jan 30, 2025
1 parent c3dd39b commit c9fb641
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"@mojaloop/central-services-health": "15.0.2",
"@mojaloop/central-services-logger": "11.5.4",
"@mojaloop/central-services-metrics": "12.4.4",
"@mojaloop/central-services-shared": "18.16.2",
"@mojaloop/central-services-shared": "18.17.0",
"@mojaloop/central-services-stream": "11.4.3",
"@mojaloop/event-sdk": "14.1.3",
"@mojaloop/inter-scheme-proxy-cache-lib": "2.3.1",
Expand Down
4 changes: 2 additions & 2 deletions src/model/fxQuotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ class FxQuotesModel {

// persist the error
await this.db.createFxQuoteError(txn, conversionRequestId, {
errorCode: Number(error.errorCode),
errorCode: Number(error.errorCode) || 2001, // Internal Server Error: https://github.com/mojaloop/central-services-error-handling/blob/master/src/errors.js#L29
errorDescription: error.errorDescription
})

Expand All @@ -607,7 +607,7 @@ class FxQuotesModel {
histTimer({ success: true, queryName: 'handleFxQuoteError' })
} catch (err) {
histTimer({ success: false, queryName: 'handleFxQuoteError' })
this.log.error('error in handleFxQuoteError', err)
this.log.child({ headers, conversionRequestId, error }).error('error in handleFxQuoteError', err)
if (txn) {
await txn.rollback().catch(() => {})
}
Expand Down
4 changes: 2 additions & 2 deletions test/unit/serverStart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ describe('Server Start', () => {
delete headers.date
const expectedResult = {
errorInformation: {
errorCode: '3101',
errorDescription: 'Malformed syntax - Invalid date header'
errorCode: '3102',
errorDescription: 'Missing mandatory element - Missing required date header'
}
}

Expand Down

0 comments on commit c9fb641

Please sign in to comment.