@mojaloop/central-ledger 19.4.0 → 19.4.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.
Files changed (84) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.json +4 -4
  3. package/src/api/ledgerAccountTypes/handler.js +1 -1
  4. package/src/api/participants/handler.js +2 -2
  5. package/src/api/settlementModels/handler.js +2 -2
  6. package/src/api/transactions/handler.js +1 -1
  7. package/src/domain/bulkTransfer/index.js +1 -1
  8. package/src/domain/position/abort.js +1 -1
  9. package/src/domain/position/binProcessor.js +1 -1
  10. package/src/domain/position/fulfil.js +1 -1
  11. package/src/domain/position/fx-fulfil.js +1 -1
  12. package/src/domain/position/fx-prepare.js +1 -1
  13. package/src/domain/position/fx-timeout-reserved.js +1 -1
  14. package/src/domain/position/prepare.js +1 -1
  15. package/src/domain/position/timeout-reserved.js +1 -1
  16. package/src/domain/transfer/transform.js +1 -1
  17. package/src/handlers/admin/handler.js +2 -2
  18. package/src/handlers/bulk/fulfil/handler.js +2 -2
  19. package/src/handlers/bulk/get/handler.js +2 -2
  20. package/src/handlers/bulk/index.js +1 -1
  21. package/src/handlers/bulk/prepare/handler.js +2 -2
  22. package/src/handlers/bulk/processing/handler.js +2 -2
  23. package/src/handlers/index.js +1 -1
  24. package/src/handlers/positions/handler.js +2 -2
  25. package/src/handlers/positions/handlerBatch.js +1 -1
  26. package/src/handlers/register.js +1 -1
  27. package/src/handlers/timeouts/handler.js +1 -1
  28. package/src/handlers/transfers/FxFulfilService.js +1 -1
  29. package/src/handlers/transfers/handler.js +2 -2
  30. package/src/handlers/transfers/prepare.js +1 -1
  31. package/src/handlers/transfers/validator.js +1 -1
  32. package/src/lib/enum.js +1 -1
  33. package/src/lib/healthCheck/subServiceHealth.js +1 -1
  34. package/src/models/bulkTransfer/bulkTransfer.js +1 -1
  35. package/src/models/bulkTransfer/bulkTransferAssociation.js +1 -1
  36. package/src/models/bulkTransfer/bulkTransferDuplicateCheck.js +2 -2
  37. package/src/models/bulkTransfer/bulkTransferExtension.js +1 -1
  38. package/src/models/bulkTransfer/bulkTransferFulfilmentDuplicateCheck.js +2 -2
  39. package/src/models/bulkTransfer/bulkTransferStateChange.js +2 -2
  40. package/src/models/bulkTransfer/facade.js +1 -1
  41. package/src/models/bulkTransfer/individualTransfer.js +1 -1
  42. package/src/models/fxTransfer/duplicateCheck.js +1 -1
  43. package/src/models/fxTransfer/fxTransfer.js +1 -1
  44. package/src/models/fxTransfer/fxTransferError.js +1 -1
  45. package/src/models/fxTransfer/fxTransferExtension.js +1 -1
  46. package/src/models/fxTransfer/fxTransferTimeout.js +2 -2
  47. package/src/models/fxTransfer/stateChange.js +1 -1
  48. package/src/models/fxTransfer/watchList.js +1 -1
  49. package/src/models/ilpPackets/ilpPacket.js +1 -1
  50. package/src/models/ledgerAccountType/ledgerAccountType.js +1 -1
  51. package/src/models/misc/segment.js +1 -1
  52. package/src/models/participant/externalParticipant.js +1 -1
  53. package/src/models/participant/externalParticipantCached.js +1 -1
  54. package/src/models/participant/facade.js +1 -1
  55. package/src/models/participant/participant.js +1 -1
  56. package/src/models/participant/participantCached.js +1 -1
  57. package/src/models/participant/participantCurrency.js +1 -1
  58. package/src/models/participant/participantCurrencyCached.js +1 -1
  59. package/src/models/participant/participantLimit.js +1 -1
  60. package/src/models/participant/participantLimitCached.js +1 -1
  61. package/src/models/participant/participantPosition.js +1 -1
  62. package/src/models/participant/participantPositionChange.js +1 -1
  63. package/src/models/position/batch.js +1 -1
  64. package/src/models/position/batchCached.js +1 -1
  65. package/src/models/position/facade.js +2 -2
  66. package/src/models/position/participantPosition.js +1 -1
  67. package/src/models/position/participantPositionChanges.js +1 -1
  68. package/src/models/settlement/settlementModel.js +1 -1
  69. package/src/models/settlement/settlementModelCached.js +1 -1
  70. package/src/models/transfer/facade.js +1 -1
  71. package/src/models/transfer/ilpPacket.js +1 -1
  72. package/src/models/transfer/transfer.js +2 -2
  73. package/src/models/transfer/transferDuplicateCheck.js +2 -2
  74. package/src/models/transfer/transferError.js +2 -2
  75. package/src/models/transfer/transferErrorDuplicateCheck.js +2 -2
  76. package/src/models/transfer/transferExtension.js +1 -1
  77. package/src/models/transfer/transferFulfilment.js +2 -2
  78. package/src/models/transfer/transferFulfilmentDuplicateCheck.js +2 -2
  79. package/src/models/transfer/transferParticipant.js +2 -2
  80. package/src/models/transfer/transferStateChange.js +2 -2
  81. package/src/models/transfer/transferTimeout.js +2 -2
  82. package/src/schema/bulkTransfer.js +1 -1
  83. package/src/shared/rethrow.js +8 -0
  84. package/src/shared/setup.js +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
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
+ ### [19.4.1](https://github.com/mojaloop/central-ledger/compare/v19.4.0...v19.4.1) (2025-04-01)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * use context logger ([#1162](https://github.com/mojaloop/central-ledger/issues/1162)) ([6776926](https://github.com/mojaloop/central-ledger/commit/6776926a895294ec310c7b467d14caae635a1bb4))
11
+
5
12
  ## [19.4.0](https://github.com/mojaloop/central-ledger/compare/v19.3.0...v19.4.0) (2025-03-26)
6
13
 
7
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/central-ledger",
3
- "version": "19.4.0",
3
+ "version": "19.4.1",
4
4
  "description": "Central ledger hosted by a scheme to record and settle transfers",
5
5
  "license": "Apache-2.0",
6
6
  "author": "ModusBox",
@@ -89,9 +89,9 @@
89
89
  "@hapi/vision": "7.0.3",
90
90
  "@mojaloop/central-services-error-handling": "13.0.7",
91
91
  "@mojaloop/central-services-health": "15.0.4",
92
- "@mojaloop/central-services-logger": "11.8.0",
92
+ "@mojaloop/central-services-logger": "11.8.1",
93
93
  "@mojaloop/central-services-metrics": "12.5.0",
94
- "@mojaloop/central-services-shared": "18.23.1",
94
+ "@mojaloop/central-services-shared": "18.23.2",
95
95
  "@mojaloop/central-services-stream": "11.5.2",
96
96
  "@mojaloop/database-lib": "11.1.4",
97
97
  "@mojaloop/event-sdk": "14.4.0",
@@ -104,7 +104,7 @@
104
104
  "base64url": "3.0.1",
105
105
  "blipp": "4.0.2",
106
106
  "commander": "13.1.0",
107
- "cron": "4.1.0",
107
+ "cron": "4.1.3",
108
108
  "decimal.js": "10.5.0",
109
109
  "docdash": "2.0.2",
110
110
  "event-stream": "4.0.1",
@@ -30,7 +30,7 @@
30
30
 
31
31
  const LedgerAccountTypesService = require('../../domain/ledgerAccountTypes')
32
32
  const ErrorHandler = require('@mojaloop/central-services-error-handling')
33
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
33
+ const rethrow = require('../../shared/rethrow')
34
34
 
35
35
  const getAll = async function () {
36
36
  return LedgerAccountTypesService.getAll()
@@ -32,11 +32,11 @@ const ParticipantService = require('../../domain/participant')
32
32
  const UrlParser = require('../../lib/urlParser')
33
33
  const Config = require('../../lib/config')
34
34
  const Util = require('@mojaloop/central-services-shared').Util
35
- const Logger = require('@mojaloop/central-services-logger')
35
+ const Logger = require('../../shared/logger').logger
36
36
  const ErrorHandler = require('@mojaloop/central-services-error-handling')
37
37
  const Enums = require('../../lib/enumCached')
38
38
  const SettlementService = require('../../domain/settlement')
39
- const rethrow = Util.rethrow.with('CL')
39
+ const rethrow = require('../../shared/rethrow')
40
40
 
41
41
  const LocalEnum = {
42
42
  activated: 'activated',
@@ -34,8 +34,8 @@ const ErrorHandler = require('@mojaloop/central-services-error-handling')
34
34
  const Enums = require('../../lib/enumCached')
35
35
  const Util = require('@mojaloop/central-services-shared').Util
36
36
  const Enum = require('@mojaloop/central-services-shared').Enum.Settlements
37
- const Logger = require('@mojaloop/central-services-logger')
38
- const rethrow = Util.rethrow.with('CL')
37
+ const Logger = require('../../shared/logger').logger
38
+ const rethrow = require('../../shared/rethrow')
39
39
 
40
40
  const entityItem = ({ settlementModelId, name, isActive, settlementGranularityId, settlementInterchangeId, settlementDelayId, currencyId, requireLiquidityCheck, ledgerAccountTypeId, autoPositionReset }, ledgerAccountIds, settlementGranularityIds, settlementInterchangeIds, settlementDelayIds) => {
41
41
  return {
@@ -29,7 +29,7 @@
29
29
  'use strict'
30
30
 
31
31
  const ErrorHandler = require('@mojaloop/central-services-error-handling')
32
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
32
+ const rethrow = require('../../shared/rethrow')
33
33
 
34
34
  const Transaction = require('../../domain/transactions')
35
35
 
@@ -42,7 +42,7 @@ const BulkTransferStateChangeModel = require('../../models/bulkTransfer/bulkTran
42
42
  const IndividualTransferModel = require('../../models/bulkTransfer/individualTransfer')
43
43
  const IndividualTransferExtensionModel = require('../../models/transfer/transferExtension')
44
44
  const MLNumber = require('@mojaloop/ml-number')
45
- const Logger = require('@mojaloop/central-services-logger')
45
+ const Logger = require('../../shared/logger').logger
46
46
 
47
47
  const getBulkTransferById = async (id) => {
48
48
  try {
@@ -37,7 +37,7 @@ const ErrorHandler = require('@mojaloop/central-services-error-handling')
37
37
  const Config = require('../../lib/config')
38
38
  const Utility = require('@mojaloop/central-services-shared').Util
39
39
  const MLNumber = require('@mojaloop/ml-number')
40
- const Logger = require('@mojaloop/central-services-logger')
40
+ const Logger = require('../../shared/logger').logger
41
41
 
42
42
  /**
43
43
  * @function processPositionAbortBin
@@ -29,7 +29,7 @@
29
29
  ******/
30
30
  'use strict'
31
31
 
32
- const Logger = require('@mojaloop/central-services-logger')
32
+ const Logger = require('../../shared/logger').logger
33
33
  const BatchPositionModel = require('../../models/position/batch')
34
34
  const BatchPositionModelCached = require('../../models/position/batchCached')
35
35
  const PositionPrepareDomain = require('./prepare')
@@ -38,7 +38,7 @@ const ErrorHandler = require('@mojaloop/central-services-error-handling')
38
38
  const Config = require('../../lib/config')
39
39
  const Utility = require('@mojaloop/central-services-shared').Util
40
40
  const MLNumber = require('@mojaloop/ml-number')
41
- const Logger = require('@mojaloop/central-services-logger')
41
+ const Logger = require('../../shared/logger').logger
42
42
  const TransferObjectTransform = require('../../domain/transfer/transform')
43
43
 
44
44
  /**
@@ -37,7 +37,7 @@ const { Enum } = require('@mojaloop/central-services-shared')
37
37
  const ErrorHandler = require('@mojaloop/central-services-error-handling')
38
38
  const Config = require('../../lib/config')
39
39
  const Utility = require('@mojaloop/central-services-shared').Util
40
- const Logger = require('@mojaloop/central-services-logger')
40
+ const Logger = require('../../shared/logger').logger
41
41
 
42
42
  /**
43
43
  * @function processPositionFxFulfilBin
@@ -38,7 +38,7 @@ const ErrorHandler = require('@mojaloop/central-services-error-handling')
38
38
  const Config = require('../../lib/config')
39
39
  const Utility = require('@mojaloop/central-services-shared').Util
40
40
  const MLNumber = require('@mojaloop/ml-number')
41
- const Logger = require('@mojaloop/central-services-logger')
41
+ const Logger = require('../../shared/logger').logger
42
42
 
43
43
  /**
44
44
  * @function processFxPositionPrepareBin
@@ -38,7 +38,7 @@ const ErrorHandler = require('@mojaloop/central-services-error-handling')
38
38
  const Config = require('../../lib/config')
39
39
  const Utility = require('@mojaloop/central-services-shared').Util
40
40
  const MLNumber = require('@mojaloop/ml-number')
41
- const Logger = require('@mojaloop/central-services-logger')
41
+ const Logger = require('../../shared/logger').logger
42
42
 
43
43
  /**
44
44
  * @function processPositionFxTimeoutReservedBin
@@ -37,7 +37,7 @@ const { Enum } = require('@mojaloop/central-services-shared')
37
37
  const ErrorHandler = require('@mojaloop/central-services-error-handling')
38
38
  const Utility = require('@mojaloop/central-services-shared').Util
39
39
  const MLNumber = require('@mojaloop/ml-number')
40
- const Logger = require('@mojaloop/central-services-logger')
40
+ const Logger = require('../../shared/logger').logger
41
41
  const Config = require('../../lib/config')
42
42
 
43
43
  /**
@@ -38,7 +38,7 @@ const ErrorHandler = require('@mojaloop/central-services-error-handling')
38
38
  const Config = require('../../lib/config')
39
39
  const Utility = require('@mojaloop/central-services-shared').Util
40
40
  const MLNumber = require('@mojaloop/ml-number')
41
- const Logger = require('@mojaloop/central-services-logger')
41
+ const Logger = require('../../shared/logger').logger
42
42
 
43
43
  /**
44
44
  * @function processPositionTimeoutReservedBin
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  const Util = require('@mojaloop/central-services-shared').Util
4
- const Logger = require('@mojaloop/central-services-logger')
4
+ const Logger = require('../../shared/logger').logger
5
5
  const ErrorHandler = require('@mojaloop/central-services-error-handling')
6
6
 
7
7
  const transferProperties = [
@@ -34,7 +34,7 @@
34
34
  * @module src/handlers/transfers
35
35
  */
36
36
 
37
- const Logger = require('@mojaloop/central-services-logger')
37
+ const Logger = require('../../shared/logger').logger
38
38
  const Kafka = require('@mojaloop/central-services-shared').Util.Kafka
39
39
  const Consumer = require('@mojaloop/central-services-stream').Util.Consumer
40
40
  const Enum = require('@mojaloop/central-services-shared').Enum
@@ -46,7 +46,7 @@ const Db = require('../../lib/db')
46
46
  const httpPostRelatedActions = [Enum.Events.Event.Action.RECORD_FUNDS_IN, Enum.Events.Event.Action.RECORD_FUNDS_OUT_PREPARE_RESERVE]
47
47
  const httpPutRelatedActions = [Enum.Events.Event.Action.RECORD_FUNDS_OUT_COMMIT, Enum.Events.Event.Action.RECORD_FUNDS_OUT_ABORT]
48
48
  const allowedActions = [].concat(httpPostRelatedActions).concat(httpPutRelatedActions)
49
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
49
+ const rethrow = require('../../shared/rethrow')
50
50
 
51
51
  const createRecordFundsInOut = async (payload, transactionTimestamp, enums) => {
52
52
  /** @namespace Db.getKnex **/
@@ -29,7 +29,7 @@
29
29
  ******/
30
30
  'use strict'
31
31
 
32
- const Logger = require('@mojaloop/central-services-logger')
32
+ const Logger = require('../../../shared/logger').logger
33
33
  const BulkTransferService = require('../../../domain/bulkTransfer')
34
34
  const Util = require('@mojaloop/central-services-shared').Util
35
35
  const Kafka = require('@mojaloop/central-services-shared').Util.Kafka
@@ -45,7 +45,7 @@ const Comparators = require('@mojaloop/central-services-shared').Util.Comparator
45
45
  const ErrorHandler = require('@mojaloop/central-services-error-handling')
46
46
 
47
47
  const location = { module: 'BulkFulfilHandler', method: '', path: '' } // var object used as pointer
48
- const rethrow = Util.rethrow.with('CL')
48
+ const rethrow = require('../../../shared/rethrow')
49
49
  const consumerCommit = true
50
50
  const fromSwitch = true
51
51
 
@@ -28,7 +28,7 @@
28
28
  ******/
29
29
  'use strict'
30
30
 
31
- const Logger = require('@mojaloop/central-services-logger')
31
+ const Logger = require('../../../shared/logger').logger
32
32
  const EventSdk = require('@mojaloop/event-sdk')
33
33
  const Util = require('@mojaloop/central-services-shared').Util
34
34
  const Kafka = require('@mojaloop/central-services-shared').Util.Kafka
@@ -44,7 +44,7 @@ const Validator = require('../shared/validator')
44
44
  const { ERROR_HANDLING } = require('../../../lib/config')
45
45
 
46
46
  const location = { module: 'BulkGetHandler', method: '', path: '' }
47
- const rethrow = Util.rethrow.with('CL')
47
+ const rethrow = require('../../../shared/rethrow')
48
48
 
49
49
  const consumerCommit = true
50
50
  const fromSwitch = true
@@ -35,7 +35,7 @@ const BulkPrepareHandlers = require('./prepare/handler')
35
35
  const BulkFulfilHandlers = require('./fulfil/handler')
36
36
  const BulkProcessingHandlers = require('./processing/handler')
37
37
  const GetBulkTransferHandlers = require('./get/handler')
38
- const Logger = require('@mojaloop/central-services-logger')
38
+ const Logger = require('../../shared/logger').logger
39
39
 
40
40
  /**
41
41
  * @function RegisterAllHandlers
@@ -30,7 +30,7 @@
30
30
  ******/
31
31
  'use strict'
32
32
 
33
- const Logger = require('@mojaloop/central-services-logger')
33
+ const Logger = require('../../../shared/logger').logger
34
34
  const BulkTransferService = require('../../../domain/bulkTransfer')
35
35
  const Util = require('@mojaloop/central-services-shared').Util
36
36
  const Kafka = require('@mojaloop/central-services-shared').Util.Kafka
@@ -47,7 +47,7 @@ const Comparators = require('@mojaloop/central-services-shared').Util.Comparator
47
47
  const ErrorHandler = require('@mojaloop/central-services-error-handling')
48
48
 
49
49
  const location = { module: 'BulkPrepareHandler', method: '', path: '' } // var object used as pointer
50
- const rethrow = Util.rethrow.with('CL')
50
+ const rethrow = require('../../../shared/rethrow')
51
51
  const consumerCommit = true
52
52
  const fromSwitch = true
53
53
 
@@ -29,7 +29,7 @@
29
29
  ******/
30
30
  'use strict'
31
31
 
32
- const Logger = require('@mojaloop/central-services-logger')
32
+ const Logger = require('../../../shared/logger').logger
33
33
  const BulkTransferService = require('../../../domain/bulkTransfer')
34
34
  const Util = require('@mojaloop/central-services-shared').Util
35
35
  const Producer = require('@mojaloop/central-services-stream').Util.Producer
@@ -44,7 +44,7 @@ const Kafka = Util.Kafka
44
44
  const HeaderValidation = Util.HeaderValidation
45
45
 
46
46
  const location = { module: 'BulkProcessingHandler', method: '', path: '' } // var object used as pointer
47
- const rethrow = Util.rethrow.with('CL')
47
+ const rethrow = require('../../../shared/rethrow')
48
48
  const consumerCommit = true
49
49
  const fromSwitch = true
50
50
 
@@ -33,7 +33,7 @@
33
33
  * @module Handlers CLI Startup
34
34
  */
35
35
 
36
- const Logger = require('@mojaloop/central-services-logger')
36
+ const Logger = require('../shared/logger').logger
37
37
  const Config = require('../lib/config')
38
38
  const Setup = require('../shared/setup')
39
39
  const PJson = require('../../package.json')
@@ -38,7 +38,7 @@
38
38
  * @module src/handlers/positions
39
39
  */
40
40
 
41
- const Logger = require('@mojaloop/central-services-logger')
41
+ const Logger = require('../../shared/logger').logger
42
42
  const EventSdk = require('@mojaloop/event-sdk')
43
43
  const TransferService = require('../../domain/transfer')
44
44
  const TransferObjectTransform = require('../../domain/transfer/transform')
@@ -58,7 +58,7 @@ const decodeMessages = require('@mojaloop/central-services-shared').Util.Streami
58
58
  const ErrorHandler = require('@mojaloop/central-services-error-handling')
59
59
 
60
60
  const location = { module: 'PositionHandler', method: '', path: '' } // var object used as pointer
61
- const rethrow = Utility.rethrow.with('CL')
61
+ const rethrow = require('../../shared/rethrow')
62
62
  const consumerCommit = true
63
63
  const fromSwitch = true
64
64
 
@@ -50,7 +50,7 @@ const decodePayload = require('@mojaloop/central-services-shared').Util.Streamin
50
50
  const { BATCHING } = require('../../shared/constants')
51
51
 
52
52
  const consumerCommit = true
53
- const rethrow = Utility.rethrow.with('CL')
53
+ const rethrow = require('../../shared/rethrow')
54
54
 
55
55
  /**
56
56
  * @function positions
@@ -46,7 +46,7 @@
46
46
  * @returns {boolean} - Returns a boolean: true if successful, or throws and error if failed
47
47
  */
48
48
 
49
- const Logger = require('@mojaloop/central-services-logger')
49
+ const Logger = require('../shared/logger').logger
50
50
  const requireGlob = require('require-glob')
51
51
  const TransferHandlers = require('./transfers/handler')
52
52
  const PositionHandlers = require('./positions/handler')
@@ -46,7 +46,7 @@ const TimeoutService = require('../../domain/timeout')
46
46
  const { logger } = require('../../shared/logger')
47
47
 
48
48
  const { Kafka, resourceVersions } = Utility
49
- const rethrow = Utility.rethrow.with('CL')
49
+ const rethrow = require('../../shared/rethrow')
50
50
  const { Action, Type } = Enum.Events.Event
51
51
 
52
52
  let timeoutJob
@@ -35,7 +35,7 @@ const ErrorHandler = require('@mojaloop/central-services-error-handling')
35
35
  const { Type, Action } = Enum.Events.Event
36
36
  const { SOURCE, DESTINATION } = Enum.Http.Headers.FSPIOP
37
37
  const { TransferState, TransferInternalState } = Enum.Transfers
38
- const rethrow = Util.rethrow.with('CL')
38
+ const rethrow = require('../../shared/rethrow')
39
39
  const consumerCommit = true
40
40
  const fromSwitch = true
41
41
 
@@ -38,7 +38,7 @@
38
38
  * @module src/handlers/transfers
39
39
  */
40
40
 
41
- const Logger = require('@mojaloop/central-services-logger')
41
+ const Logger = require('../../shared/logger').logger
42
42
  const EventSdk = require('@mojaloop/event-sdk')
43
43
  const ErrorHandler = require('@mojaloop/central-services-error-handling')
44
44
  const Metrics = require('@mojaloop/central-services-metrics')
@@ -65,7 +65,7 @@ const TransferEventType = Enum.Events.Event.Type
65
65
  const TransferEventAction = Enum.Events.Event.Action
66
66
  const decodePayload = Util.StreamingProtocol.decodePayload
67
67
 
68
- const rethrow = Util.rethrow.with('CL')
68
+ const rethrow = require('../../shared/rethrow')
69
69
  const consumerCommit = true
70
70
  const fromSwitch = true
71
71
 
@@ -50,7 +50,7 @@ const { FSPIOPErrorCodes } = ErrorHandler.Enums
50
50
  const { createFSPIOPError, reformatFSPIOPError } = ErrorHandler.Factory
51
51
  const { fspId } = Config.INSTRUMENTATION_METRICS_LABELS
52
52
 
53
- const rethrow = Util.rethrow.with('CL')
53
+ const rethrow = require('../../shared/rethrow')
54
54
  const consumerCommit = true
55
55
  const fromSwitch = true
56
56
  const proxyEnabled = Config.PROXY_CACHE_CONFIG.enabled
@@ -37,7 +37,7 @@
37
37
  * @module src/handlers/transfers
38
38
  */
39
39
 
40
- const Logger = require('@mojaloop/central-services-logger')
40
+ const Logger = require('../../shared/logger').logger
41
41
  const Decimal = require('decimal.js')
42
42
  const Config = require('../../lib/config')
43
43
  const Participant = require('../../domain/participant')
package/src/lib/enum.js CHANGED
@@ -31,7 +31,7 @@
31
31
 
32
32
  const Config = require('./config')
33
33
  const Db = require('./db')
34
- const Logger = require('@mojaloop/central-services-logger')
34
+ const Logger = require('../shared/logger').logger
35
35
 
36
36
  const endpointType = async function () {
37
37
  try {
@@ -27,7 +27,7 @@
27
27
  'use strict'
28
28
 
29
29
  const { statusEnum, serviceName } = require('@mojaloop/central-services-shared').HealthCheck.HealthCheckEnums
30
- const Logger = require('@mojaloop/central-services-logger')
30
+ const Logger = require('../../shared/logger').logger
31
31
  const Consumer = require('@mojaloop/central-services-stream').Util.Consumer
32
32
  const ProxyCache = require('../proxyCache')
33
33
  const MigrationLockModel = require('../../models/misc/migrationLock')
@@ -27,7 +27,7 @@
27
27
  'use strict'
28
28
 
29
29
  const Db = require('../../lib/db')
30
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
30
+ const rethrow = require('../../shared/rethrow')
31
31
 
32
32
  const getById = async (id) => {
33
33
  try {
@@ -30,7 +30,7 @@
30
30
  const Db = require('../../lib/db')
31
31
  const Time = require('@mojaloop/central-services-shared').Util.Time
32
32
  const LibUtil = require('@mojaloop/central-services-shared').Util
33
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
33
+ const rethrow = require('../../shared/rethrow')
34
34
 
35
35
  exports.create = async (bulkTransferAssociation) => {
36
36
  try {
@@ -32,8 +32,8 @@
32
32
  */
33
33
 
34
34
  const Db = require('../../lib/db')
35
- const Logger = require('@mojaloop/central-services-logger')
36
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
35
+ const Logger = require('../../shared/logger').logger
36
+ const rethrow = require('../../shared/rethrow')
37
37
 
38
38
  /**
39
39
  * @function GetBulkTransferDuplicateCheck
@@ -27,7 +27,7 @@
27
27
  'use strict'
28
28
 
29
29
  const Db = require('../../lib/db')
30
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
30
+ const rethrow = require('../../shared/rethrow')
31
31
 
32
32
  const getByBulkTransferId = async (id) => {
33
33
  try {
@@ -32,8 +32,8 @@
32
32
  */
33
33
 
34
34
  const Db = require('../../lib/db')
35
- const Logger = require('@mojaloop/central-services-logger')
36
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
35
+ const Logger = require('../../shared/logger').logger
36
+ const rethrow = require('../../shared/rethrow')
37
37
 
38
38
  /**
39
39
  * @function GetBulkTransferFulfilmentDuplicateCheck
@@ -27,8 +27,8 @@
27
27
  'use strict'
28
28
 
29
29
  const Db = require('../../lib/db')
30
- const Logger = require('@mojaloop/central-services-logger')
31
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
30
+ const Logger = require('../../shared/logger').logger
31
+ const rethrow = require('../../shared/rethrow')
32
32
 
33
33
  const create = async (stateChange) => {
34
34
  Logger.isDebugEnabled && Logger.debug('save bulkTransferStateChange' + stateChange.toString())
@@ -34,7 +34,7 @@ const Db = require('../../lib/db')
34
34
  const Enum = require('@mojaloop/central-services-shared').Enum
35
35
  const Time = require('@mojaloop/central-services-shared').Util.Time
36
36
  // const BulkTransferAssociation = require('./BulkTransferAssociation')
37
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
37
+ const rethrow = require('../../shared/rethrow')
38
38
 
39
39
  const saveBulkTransferReceived = async (payload, participants, stateReason = null, isValid = true) => {
40
40
  try {
@@ -27,7 +27,7 @@
27
27
  'use strict'
28
28
 
29
29
  const Db = require('../../lib/db')
30
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
30
+ const rethrow = require('../../shared/rethrow')
31
31
 
32
32
  const getAllById = async (id) => {
33
33
  try {
@@ -37,7 +37,7 @@ const Metrics = require('@mojaloop/central-services-metrics')
37
37
  const Db = require('../../lib/db')
38
38
  const { logger } = require('../../shared/logger')
39
39
  const { TABLE_NAMES } = require('../../shared/constants')
40
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
40
+ const rethrow = require('../../shared/rethrow')
41
41
 
42
42
  const histName = 'model_fx_transfer'
43
43
 
@@ -45,7 +45,7 @@ const Db = require('../../lib/db')
45
45
  const participant = require('../participant/facade')
46
46
  const ParticipantCachedModel = require('../participant/participantCached')
47
47
  const TransferExtensionModel = require('./fxTransferExtension')
48
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
48
+ const rethrow = require('../../shared/rethrow')
49
49
 
50
50
  const { TransferInternalState } = Enum.Transfers
51
51
 
@@ -32,7 +32,7 @@
32
32
  */
33
33
 
34
34
  const Db = require('../../lib/db')
35
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
35
+ const rethrow = require('../../shared/rethrow')
36
36
 
37
37
  const getByCommitRequestId = async (id) => {
38
38
  try {
@@ -29,7 +29,7 @@
29
29
  'use strict'
30
30
 
31
31
  const Db = require('../../lib/db')
32
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
32
+ const rethrow = require('../../shared/rethrow')
33
33
 
34
34
  const getByCommitRequestId = async (commitRequestId, isFulfilment = false, isError = false) => {
35
35
  try {
@@ -28,10 +28,10 @@
28
28
  'use strict'
29
29
 
30
30
  const Db = require('../../lib/db')
31
- const Logger = require('@mojaloop/central-services-logger')
31
+ const Logger = require('../../shared/logger').logger
32
32
  const Enum = require('@mojaloop/central-services-shared').Enum
33
33
  const TS = Enum.Transfers.TransferInternalState
34
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
34
+ const rethrow = require('../../shared/rethrow')
35
35
 
36
36
  const cleanup = async () => {
37
37
  Logger.isDebugEnabled && Logger.debug('cleanup fxTransferTimeout')
@@ -36,7 +36,7 @@
36
36
  const TransferError = require('../../models/transfer/transferError')
37
37
  const Db = require('../../lib/db')
38
38
  const { TABLE_NAMES } = require('../../shared/constants')
39
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
39
+ const rethrow = require('../../shared/rethrow')
40
40
 
41
41
  const table = TABLE_NAMES.fxTransferStateChange
42
42
 
@@ -29,7 +29,7 @@
29
29
  const Db = require('../../lib/db')
30
30
  const { TABLE_NAMES } = require('../../shared/constants')
31
31
  const { logger } = require('../../shared/logger')
32
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
32
+ const rethrow = require('../../shared/rethrow')
33
33
 
34
34
  const getItemInWatchListByCommitRequestId = async (commitRequestId) => {
35
35
  logger.debug(`get item in watch list (commitRequestId=${commitRequestId})`)
@@ -28,7 +28,7 @@
28
28
  'use strict'
29
29
 
30
30
  const Db = require('../../lib/db')
31
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
31
+ const rethrow = require('../../shared/rethrow')
32
32
 
33
33
  exports.getById = async (id) => {
34
34
  try {
@@ -32,7 +32,7 @@
32
32
  'use strict'
33
33
 
34
34
  const Db = require('../../lib/db')
35
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
35
+ const rethrow = require('../../shared/rethrow')
36
36
 
37
37
  /* istanbul ignore next */
38
38
  exports.getLedgerAccountByName = async (name, trx = null) => {
@@ -28,7 +28,7 @@
28
28
  'use strict'
29
29
 
30
30
  const Db = require('../../lib/db')
31
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
31
+ const rethrow = require('../../shared/rethrow')
32
32
 
33
33
  const getByParams = async (params) => {
34
34
  try {
@@ -29,7 +29,7 @@
29
29
  const Db = require('../../lib/db')
30
30
  const { logger } = require('../../shared/logger')
31
31
  const { TABLE_NAMES, DB_ERROR_CODES } = require('../../shared/constants')
32
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
32
+ const rethrow = require('../../shared/rethrow')
33
33
 
34
34
  const TABLE = TABLE_NAMES.externalParticipant
35
35
  const ID_FIELD = 'externalParticipantId'
@@ -29,7 +29,7 @@
29
29
  const Metrics = require('@mojaloop/central-services-metrics')
30
30
  const cache = require('../../lib/cache')
31
31
  const externalParticipantModel = require('./externalParticipant')
32
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
32
+ const rethrow = require('../../shared/rethrow')
33
33
 
34
34
  let cacheClient
35
35
  let epAllCacheKey
@@ -45,7 +45,7 @@ const externalParticipantModelCached = require('../../models/participant/externa
45
45
  const Config = require('../../lib/config')
46
46
  const SettlementModelModel = require('../settlement/settlementModel')
47
47
  const { logger } = require('../../shared/logger')
48
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
48
+ const rethrow = require('../../shared/rethrow')
49
49
 
50
50
  const getByNameAndCurrency = async (name, currencyId, ledgerAccountTypeId, isCurrencyActive) => {
51
51
  const histTimerParticipantGetByNameAndCurrencyEnd = Metrics.getHistogram(
@@ -31,7 +31,7 @@
31
31
  'use strict'
32
32
 
33
33
  const Db = require('../../lib/db')
34
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
34
+ const rethrow = require('../../shared/rethrow')
35
35
 
36
36
  exports.getAll = async () => {
37
37
  try {
@@ -30,7 +30,7 @@
30
30
  const Cache = require('../../lib/cache')
31
31
  const ParticipantModel = require('../../models/participant/participant')
32
32
  const Metrics = require('@mojaloop/central-services-metrics')
33
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
33
+ const rethrow = require('../../shared/rethrow')
34
34
 
35
35
  let cacheClient
36
36
  let participantsAllCacheKey
@@ -28,7 +28,7 @@
28
28
  'use strict'
29
29
 
30
30
  const Db = require('../../lib/db')
31
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
31
+ const rethrow = require('../../shared/rethrow')
32
32
 
33
33
  exports.create = async (participantId, currencyId, ledgerAccountTypeId, isActive = true) => {
34
34
  try {
@@ -31,7 +31,7 @@ const Cache = require('../../lib/cache')
31
31
  const Config = require('../../../src/lib/config')
32
32
  const ParticipantCurrencyModel = require('../../models/participant/participantCurrency')
33
33
  const Metrics = require('@mojaloop/central-services-metrics')
34
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
34
+ const rethrow = require('../../shared/rethrow')
35
35
 
36
36
  let cacheClient
37
37
  let participantCurrencyAllCacheKey
@@ -33,7 +33,7 @@
33
33
 
34
34
  const Db = require('../../lib/db')
35
35
  const ParticipantCurrencyModel = require('./participantCurrencyCached')
36
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
36
+ const rethrow = require('../../shared/rethrow')
37
37
 
38
38
  const insert = async (participantLimit) => {
39
39
  try {
@@ -30,7 +30,7 @@
30
30
  const Cache = require('../../lib/cache')
31
31
  const ParticipantLimitModel = require('../../models/participant/participantLimit')
32
32
  const Metrics = require('@mojaloop/central-services-metrics')
33
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
33
+ const rethrow = require('../../shared/rethrow')
34
34
 
35
35
  let cacheClient
36
36
  let participantLimitAllCacheKey
@@ -37,7 +37,7 @@
37
37
 
38
38
  const Db = require('../../lib/db')
39
39
  const ParticipantCurrencyModel = require('./participantCurrencyCached')
40
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
40
+ const rethrow = require('../../shared/rethrow')
41
41
 
42
42
  /**
43
43
  * @function GetByParticipantCurrencyId
@@ -33,7 +33,7 @@
33
33
 
34
34
  const Db = require('../../lib/db')
35
35
  const Metrics = require('@mojaloop/central-services-metrics')
36
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
36
+ const rethrow = require('../../shared/rethrow')
37
37
 
38
38
  /**
39
39
  * @function getByParticipantPositionId
@@ -33,7 +33,7 @@
33
33
  const Db = require('../../lib/db')
34
34
  const TransferExtensionModel = require('../transfer/transferExtension')
35
35
  const { Enum } = require('@mojaloop/central-services-shared')
36
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
36
+ const rethrow = require('../../shared/rethrow')
37
37
 
38
38
  const startDbTransaction = async () => {
39
39
  const knex = await Db.getKnex()
@@ -33,7 +33,7 @@
33
33
  const Cache = require('../../lib/cache')
34
34
  const Metrics = require('@mojaloop/central-services-metrics')
35
35
  const BatchPositionModel = require('./batch')
36
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
36
+ const rethrow = require('../../shared/rethrow')
37
37
 
38
38
  let cacheClient
39
39
  let participantCurrencyAllCacheKey
@@ -37,12 +37,12 @@ const Db = require('../../lib/db')
37
37
  const Enum = require('@mojaloop/central-services-shared').Enum
38
38
  const participantFacade = require('../participant/facade')
39
39
  const SettlementModelCached = require('../../models/settlement/settlementModelCached')
40
- const Logger = require('@mojaloop/central-services-logger')
40
+ const Logger = require('../../shared/logger').logger
41
41
  const Time = require('@mojaloop/central-services-shared').Util.Time
42
42
  const MLNumber = require('@mojaloop/ml-number')
43
43
  const ErrorHandler = require('@mojaloop/central-services-error-handling')
44
44
  const Config = require('../../lib/config')
45
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
45
+ const rethrow = require('../../shared/rethrow')
46
46
 
47
47
  const Metrics = require('@mojaloop/central-services-metrics')
48
48
 
@@ -28,7 +28,7 @@
28
28
  'use strict'
29
29
 
30
30
  const Db = require('../../lib/db')
31
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
31
+ const rethrow = require('../../shared/rethrow')
32
32
 
33
33
  const insert = async (participantPosition) => {
34
34
  try {
@@ -29,7 +29,7 @@
29
29
 
30
30
  const Db = require('../../lib/db')
31
31
  const Enum = require('@mojaloop/central-services-shared').Enum
32
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
32
+ const rethrow = require('../../shared/rethrow')
33
33
 
34
34
  const getReservedPositionChangesByCommitRequestId = async (commitRequestId) => {
35
35
  try {
@@ -29,7 +29,7 @@
29
29
  'use strict'
30
30
 
31
31
  const Db = require('../../lib/db')
32
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
32
+ const rethrow = require('../../shared/rethrow')
33
33
 
34
34
  /* istanbul ignore next */
35
35
  exports.create = async (name, isActive, settlementGranularityId, settlementInterchangeId, settlementDelayId, currencyId, requireLiquidityCheck, ledgerAccountTypeId, settlementAccountTypeId, autoPositionReset, trx = null) => {
@@ -30,7 +30,7 @@
30
30
  const Cache = require('../../lib/cache')
31
31
  const SettlementModel = require('../../models/settlement/settlementModel')
32
32
  const Metrics = require('@mojaloop/central-services-metrics')
33
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
33
+ const rethrow = require('../../shared/rethrow')
34
34
 
35
35
  let cacheClient
36
36
  let settlementModelsAllCacheKey
@@ -48,7 +48,7 @@ const Config = require('../../lib/config')
48
48
  const ParticipantFacade = require('../participant/facade')
49
49
  const ParticipantCachedModel = require('../participant/participantCached')
50
50
  const TransferExtensionModel = require('./transferExtension')
51
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
51
+ const rethrow = require('../../shared/rethrow')
52
52
 
53
53
  const TransferEventAction = Enum.Events.Event.Action
54
54
  const TransferInternalState = Enum.Transfers.TransferInternalState
@@ -30,7 +30,7 @@
30
30
 
31
31
  const Db = require('../../lib/db')
32
32
  const Util = require('@mojaloop/central-services-shared').Util
33
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
33
+ const rethrow = require('../../shared/rethrow')
34
34
 
35
35
  exports.saveIlpPacket = async (record) => {
36
36
  try {
@@ -28,8 +28,8 @@
28
28
  'use strict'
29
29
 
30
30
  const Db = require('../../lib/db')
31
- const Logger = require('@mojaloop/central-services-logger')
32
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
31
+ const Logger = require('../../shared/logger').logger
32
+ const rethrow = require('../../shared/rethrow')
33
33
 
34
34
  const getById = async (transferId) => {
35
35
  try {
@@ -32,9 +32,9 @@
32
32
  */
33
33
 
34
34
  const Db = require('../../lib/db')
35
- const Logger = require('@mojaloop/central-services-logger')
35
+ const Logger = require('../../shared/logger').logger
36
36
  const Metrics = require('@mojaloop/central-services-metrics')
37
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
37
+ const rethrow = require('../../shared/rethrow')
38
38
 
39
39
  /**
40
40
  * @function GetTransferDuplicateCheck
@@ -33,8 +33,8 @@
33
33
  */
34
34
 
35
35
  const Db = require('../../lib/db')
36
- const Logger = require('@mojaloop/central-services-logger')
37
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
36
+ const Logger = require('../../shared/logger').logger
37
+ const rethrow = require('../../shared/rethrow')
38
38
 
39
39
  /**
40
40
  * @function Insert
@@ -32,8 +32,8 @@
32
32
  */
33
33
 
34
34
  const Db = require('../../lib/db')
35
- const Logger = require('@mojaloop/central-services-logger')
36
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
35
+ const Logger = require('../../shared/logger').logger
36
+ const rethrow = require('../../shared/rethrow')
37
37
 
38
38
  /**
39
39
  * @function GetTransferFulfilmentDuplicateCheck
@@ -31,7 +31,7 @@
31
31
  'use strict'
32
32
 
33
33
  const Db = require('../../lib/db')
34
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
34
+ const rethrow = require('../../shared/rethrow')
35
35
 
36
36
  const saveTransferExtension = async (extension) => {
37
37
  try {
@@ -28,8 +28,8 @@
28
28
  'use strict'
29
29
 
30
30
  const Db = require('../../lib/db')
31
- const Logger = require('@mojaloop/central-services-logger')
32
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
31
+ const Logger = require('../../shared/logger').logger
32
+ const rethrow = require('../../shared/rethrow')
33
33
 
34
34
  const getByTransferId = async (transferId) => {
35
35
  Logger.isDebugEnabled && Logger.debug('getByTransferId ' + transferId.toString())
@@ -32,8 +32,8 @@
32
32
  */
33
33
 
34
34
  const Db = require('../../lib/db')
35
- const Logger = require('@mojaloop/central-services-logger')
36
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
35
+ const Logger = require('../../shared/logger').logger
36
+ const rethrow = require('../../shared/rethrow')
37
37
 
38
38
  /**
39
39
  * @function GetTransferFulfilmentDuplicateCheck
@@ -28,8 +28,8 @@
28
28
  'use strict'
29
29
 
30
30
  const Db = require('../../lib/db')
31
- const Logger = require('@mojaloop/central-services-logger')
32
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
31
+ const Logger = require('../../shared/logger').logger
32
+ const rethrow = require('../../shared/rethrow')
33
33
 
34
34
  const saveTransferParticipant = async (record) => {
35
35
  Logger.isDebugEnabled && Logger.debug('save transferParticipant' + record.toString())
@@ -30,8 +30,8 @@
30
30
  'use strict'
31
31
 
32
32
  const Db = require('../../lib/db')
33
- const Logger = require('@mojaloop/central-services-logger')
34
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
33
+ const Logger = require('../../shared/logger').logger
34
+ const rethrow = require('../../shared/rethrow')
35
35
 
36
36
  const saveTransferStateChange = async (stateChange) => {
37
37
  Logger.isDebugEnabled && Logger.debug('save transferStateChange' + stateChange.toString())
@@ -28,9 +28,9 @@
28
28
  'use strict'
29
29
 
30
30
  const Db = require('../../lib/db')
31
- const Logger = require('@mojaloop/central-services-logger')
31
+ const Logger = require('../../shared/logger').logger
32
32
  const Enum = require('@mojaloop/central-services-shared').Enum
33
- const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('CL')
33
+ const rethrow = require('../../shared/rethrow')
34
34
  const TS = Enum.Transfers.TransferInternalState
35
35
 
36
36
  const cleanup = async () => {
@@ -29,7 +29,7 @@
29
29
  'use strict'
30
30
 
31
31
  const mongoose = require('mongoose')
32
- const Logger = require('@mojaloop/central-services-logger')
32
+ const Logger = require('../shared/logger').logger
33
33
 
34
34
  // single transfer model
35
35
  const transfer = {
@@ -0,0 +1,8 @@
1
+ const rethrow = require('@mojaloop/central-services-shared').Util.rethrow
2
+ const loggerOverride = require('./logger').logger
3
+
4
+ module.exports = {
5
+ rethrowDatabaseError: (error, options) => rethrow.rethrowDatabaseError(error, { ...options, loggerOverride }),
6
+ rethrowCachedDatabaseError: (error, options) => rethrow.rethrowCachedDatabaseError(error, { ...options, loggerOverride }),
7
+ rethrowAndCountFspiopError: (error, options) => rethrow.rethrowAndCountFspiopError(error, { ...options, loggerOverride }, 'CL')
8
+ }
@@ -36,7 +36,7 @@
36
36
  const Hapi = require('@hapi/hapi')
37
37
  const MongoUriBuilder = require('mongo-uri-builder')
38
38
  const ObjStoreDb = require('@mojaloop/object-store-lib').Db
39
- const Logger = require('@mojaloop/central-services-logger')
39
+ const Logger = require('../shared/logger').logger
40
40
  const Metrics = require('@mojaloop/central-services-metrics')
41
41
  const ErrorHandler = require('@mojaloop/central-services-error-handling')
42
42