Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Error code for the transfer in the Central ledger DB #2644

Closed
sri-miriyala opened this issue Jan 13, 2022 · 6 comments
Closed

Missing Error code for the transfer in the Central ledger DB #2644

sri-miriyala opened this issue Jan 13, 2022 · 6 comments
Assignees
Labels
bug Something isn't working or it has wrong behavior on a Mojaloop Core service oss-bof-framework Business Operations Framework related issus oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it

Comments

@sri-miriyala
Copy link

sri-miriyala commented Jan 13, 2022

Summary:
When the Transfer is expired with an error code "3303", that error code is not getting stored in the DB. This was found when the BizOps portal is trying to pull the error transfers based on the error codes. This transfer did not picked up in the error cases.

Severity:
Medium

Priority:
Critical

Expected Behavior
The error code should be assigned for every transfer that is failed (ABORTED)

Steps to Reproduce

  1. Check the logs for this transfer ID: 2b8666c9-8905-434b-aa19-98521f34966c

Specifications

  • Component (if known): Central Ledger
  • Version:
  • Platform: OSS infra test env
  • Subsystem:
  • Type of testing:
  • Bug found/raised by: Sri

Notes:

  • Severity when opened:
  • Priority when opened:
@sri-miriyala sri-miriyala added the bug Something isn't working or it has wrong behavior on a Mojaloop Core service label Jan 13, 2022
@sri-miriyala sri-miriyala mentioned this issue Jan 13, 2022
24 tasks
@sri-miriyala sri-miriyala added the oss-bof-framework Business Operations Framework related issus label Jan 13, 2022
@sri-miriyala sri-miriyala changed the title Missing Error codes in the Central ledger DB Missing Error code for the transfer in the Central ledger DB Jan 13, 2022
@elnyry-sam-k elnyry-sam-k added the oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it label Jan 13, 2022
@mdebarros
Copy link
Member

mdebarros commented Jan 19, 2022

Verified this issue using the following GP test on Moja1 --> hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json

Callback

{
  "url": "put /transfers/a38f9269-9249-467b-96f3-48b2ed7261cc/error",
  "headers": {
    "content-type": "application/vnd.interoperability.transfers+json;version=1.1",
    "date": "Wed, 19 Jan 2022 08:31:38 GMT",
    "authorization": "{$inputs.TTK_BEARER_TOKEN}",
    "traceparent": "00-aabbdc555b3acee9361afafab3942ed7-38598b9779f73959-30",
    "user-agent": "axios/0.21.4",
    "connection": "keep-alive",
    "fspiop-http-method": "PUT",
    "fspiop-uri": "/transfers/a38f9269-9249-467b-96f3-48b2ed7261cc/error",
    "fspiop-source": "switch",
    "fspiop-destination": "testingtoolkitdfsp",
    "fspiop-signature": "{\"signature\":\"yhZcNwjGi0SxeauL66j9F9YSrKbkgVXgsqrWQKr3cAFfBJp43LEHKn-DYwtj4fDRMKOmV6SKNU-mXMpVGVYMrZQsg4yL7QuYSKk3vcB6cJyxanJNvo4UqbTVRAOubIEV3j2ZV5iz_7VF-wAKdOymjYo4KTeUbTUUFOew-s__fp-LhX98S6A8Mn8elJC1rJ5kBu9AvjUGdcv6419Q1qjuiZJNgwAV7yuqKHjp9dPL96GLwg1Wn5CmUe3-cjaJTZDB48qWwN4dJGTVmoSetiH0bpnak5kPXgyE1WXrGGvlDsiTpnKGzYGFT_prOflYRgbJilCV9wFh1qL6a0HjXADV4g\",\"protectedHeader\":\"eyJhbGciOiJSUzI1NiIsIkZTUElPUC1VUkkiOiIvdHJhbnNmZXJzL2EzOGY5MjY5LTkyNDktNDY3Yi05NmYzLTQ4YjJlZDcyNjFjYy9lcnJvciIsIkZTUElPUC1IVFRQLU1ldGhvZCI6IlBVVCIsIkZTUElPUC1Tb3VyY2UiOiJzd2l0Y2giLCJGU1BJT1AtRGVzdGluYXRpb24iOiJ0ZXN0aW5ndG9vbGtpdGRmc3AiLCJEYXRlIjoiV2VkLCAxOSBKYW4gMjAyMiAwODozMTozOCBHTVQifQ\"}",
    "tracestate": "mojaloop=eyJzcGFuSWQiOiIzODU5OGI5Nzc5ZjczOTU5In0=",
    "content-length": "79",
    "host": "moja1-ml-testing-toolkit-backend:5000"
  },
  "body": {
    "errorInformation": {
      "errorCode": "3303",
      "errorDescription": "Transfer expired"
    }
  }
}

Running the following SQL query on transferError table returns no results:

select * from transferError where transferId = 'a38f9269-9249-467b-96f3-48b2ed7261cc';

@mdebarros
Copy link
Member

mdebarros commented Jan 19, 2022

Verified this issue using the following GP test on Moja1 --> hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json

Callback

{
  "url": "put /transfers/a38f9269-9249-467b-96f3-48b2ed7261cc/error",
  "headers": {
    "content-type": "application/vnd.interoperability.transfers+json;version=1.1",
    "date": "Wed, 19 Jan 2022 08:31:38 GMT",
    "authorization": "{$inputs.TTK_BEARER_TOKEN}",
    "traceparent": "00-aabbdc555b3acee9361afafab3942ed7-38598b9779f73959-30",
    "user-agent": "axios/0.21.4",
    "connection": "keep-alive",
    "fspiop-http-method": "PUT",
    "fspiop-uri": "/transfers/a38f9269-9249-467b-96f3-48b2ed7261cc/error",
    "fspiop-source": "switch",
    "fspiop-destination": "testingtoolkitdfsp",
    "fspiop-signature": "{\"signature\":\"yhZcNwjGi0SxeauL66j9F9YSrKbkgVXgsqrWQKr3cAFfBJp43LEHKn-DYwtj4fDRMKOmV6SKNU-mXMpVGVYMrZQsg4yL7QuYSKk3vcB6cJyxanJNvo4UqbTVRAOubIEV3j2ZV5iz_7VF-wAKdOymjYo4KTeUbTUUFOew-s__fp-LhX98S6A8Mn8elJC1rJ5kBu9AvjUGdcv6419Q1qjuiZJNgwAV7yuqKHjp9dPL96GLwg1Wn5CmUe3-cjaJTZDB48qWwN4dJGTVmoSetiH0bpnak5kPXgyE1WXrGGvlDsiTpnKGzYGFT_prOflYRgbJilCV9wFh1qL6a0HjXADV4g\",\"protectedHeader\":\"eyJhbGciOiJSUzI1NiIsIkZTUElPUC1VUkkiOiIvdHJhbnNmZXJzL2EzOGY5MjY5LTkyNDktNDY3Yi05NmYzLTQ4YjJlZDcyNjFjYy9lcnJvciIsIkZTUElPUC1IVFRQLU1ldGhvZCI6IlBVVCIsIkZTUElPUC1Tb3VyY2UiOiJzd2l0Y2giLCJGU1BJT1AtRGVzdGluYXRpb24iOiJ0ZXN0aW5ndG9vbGtpdGRmc3AiLCJEYXRlIjoiV2VkLCAxOSBKYW4gMjAyMiAwODozMTozOCBHTVQifQ\"}",
    "tracestate": "mojaloop=eyJzcGFuSWQiOiIzODU5OGI5Nzc5ZjczOTU5In0=",
    "content-length": "79",
    "host": "moja1-ml-testing-toolkit-backend:5000"
  },
  "body": {
    "errorInformation": {
      "errorCode": "3303",
      "errorDescription": "Transfer expired"
    }
  }
}

Running the following SQL query on transferError table returns no results:

select * from transferError where transferId = 'a38f9269-9249-467b-96f3-48b2ed7261cc';

@sri-miriyala please verify if these details/findings match the gist of your issue?

@sri-miriyala
Copy link
Author

yes.. this is the issue @mdebarros

@elnyry-sam-k elnyry-sam-k added the to-be-refined This story is ready to be groomed label Dec 7, 2022
@mdebarros mdebarros self-assigned this Dec 7, 2022
@elnyry-sam-k
Copy link
Member

Hey team! Please add your planning poker estimate with Zenhub @mdebarros @sri-miriyala @vijayg10 @kleyow

mdebarros added a commit to mojaloop/testing-toolkit-test-cases that referenced this issue Dec 12, 2022
…al-ledger db (#105)

fix(mojaloop/#2644): missing error-code for the transfer in the central-ledger db - mojaloop/project#2644
- added payer_transfer_timeout.json test-case to feature_tests/transfer_negative_scenarios
@mdebarros
Copy link
Member

mdebarros commented Dec 12, 2022

TTK GP Tests for hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json

Tests results from running payer transfer timeout test-case (introduced in mojaloop/testing-toolkit-test-cases#105) test results on Moja4. executed against mojaloop/central-ledger/v16.3.3-snapshot.1:

Screenshot 2022-12-12 at 18 05 34

SQL Query for Transfer and TransfersError tables for transferId = a65c2a7b-578b-4bb0-88e7-2b2784a57f32

select * from transfer as tx
inner join transferError as txe on tx.transferId = txe.transferId 
where tx.transferId = 'a65c2a7b-578b-4bb0-88e7-2b2784a57f32';

Screenshot 2022-12-12 at 18 28 07

Finance Portal showing errorCode

Finance Portal detailed information showing Error Code for [mojaloop/central-ledger/v16.3.3-snapshot.1](mojaloop/central-ledger/v16.3.3-snapshot.1

Screenshot 2022-12-12 at 18 05 19

Same screen showing the result when using previous mojaloop/central-ledger:v16.3.1 without fix

Screenshot 2022-12-12 at 18 13 31

mdebarros added a commit to mojaloop/central-ledger that referenced this issue Dec 12, 2022
…al-ledger db (#929)

fix(mojaloop/#2644): missing error-code for the transfer in the central-ledger db - mojaloop/project#2644
- added payer_transfer_timeout.json test-case to feature_tests/transfer_negative_scenarios
- updated dependencies
- Added work-around for Kafka Producer Client disconnect/connect and created a following story to investigate this further as I believe its an issue with the Kafka Producer Client Lib: mojaloop/project#3067
- Added a new Helper `KafkaHelper` to manage connect/disconnect in an effort to resolve the above issue by implementing re-usable helper functions
- Updated docker-compose to include kafka-init to pre-create Kafka topics to improve stability of Integration Tests
- Fixed issue with Wait Retry helper functions which did not set the Timeout correct (i.e. it was hard-coded to 2, instead of being set by the input parameter)
- Added env config (TST_RETRY_COUNT, TST_RETRY_TIMEOUT) for Integration Tests to set input params for Wait Retry helper functions being called by the `./transfers/handlers.test.js` test-cases
- Updated `test:int` to include env configs for TST_RETRY_COUNT, TST_RETRY_TIMEOUT and UV_THREADPOOL_SIZE (increased avaialable threads for NODE-RDKAFKA). This should include consistency for Integration Tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or it has wrong behavior on a Mojaloop Core service oss-bof-framework Business Operations Framework related issus oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it
Projects
None yet
Development

No branches or pull requests

3 participants