mojaloop / project

Repo to track product development issues for the Mojaloop project.
Other
22 stars 15 forks source link

Error"Party Not Found" Message on Get Party Call Without Destination DFSP ID #3993

Open ei-nghon-phoo opened 2 weeks ago

ei-nghon-phoo commented 2 weeks ago

Bug Fix Ticket

Title: Error"Party Not Found" Message on Get Party Call Without Destination DFSP ID

Description: When testing the Get Party call without providing a destination DFSP ID, the system returns an error 408. The logs display a "Party not found" error, even though the party is registered and there is an existing DFSP <> Party association in Oracle.

Steps to Reproduce:

  1. Perform a Get Party call without specifying the destination DFSP ID.
  2. Observe the error 408 response.
  3. Check the logs for the error message.

Expected Behavior: The system should correctly identify the registered party and provide the appropriate response, without returning an error 408 or incorrectly logging a "Party not found" error.

Environment:

elnyry-sam-k commented 1 week ago

hi @ei-nghon-phoo , thanks for the issue.

Would it be possible to add the details on the request (actual resource / URL, message body used) and then the logs directly so that its clear. Thank you!

And yes, it is correct, the destination header shouldn't be required for the GET /parties call

elnyry-sam-k commented 1 week ago

One more point, where's this 408 error code coming from, I don't see it on the list of the HTTP error codes to be used in the FSPIOP specification: https://docs.mojaloop.io/api/fspiop/v1.1/api-definition.html#http-response-status-codes

ei-nghon-phoo commented 1 week ago

408 is http response code. FSPIOP error code is 4000. { "statusCode": "4000", "detailedDescription": "GetParties no redis output obtained." }

image.png

@elnyry-sam-k

elnyry-sam-k commented 1 week ago

Thanks for the details, @ei-nghon-phoo .. 408 is not part of the FSPIOP HTTP Error codes, that was my other point earlier.. that needs to be looked at.

ZweHMyat commented 1 week ago

Fixed this issue in interop-apis-bc-fspiop-event-handler-svc v0.6.2 @ei-nghon-phoo

ei-nghon-phoo commented 1 week ago

To Test:

elnyry-sam-k commented 1 week ago

@ZweHMyat and @ei-nghon-phoo , thanks for the issue and the PR.

  1. No tests were added here to prove this was fixed: https://github.com/mojaloop/interop-apis-bc/pull/28/files ..
  2. For any fix - tests need to be added, at unit/integration level and end-to-end level to show that the issue is fixed and more importantly to catch regressions in the future.
ei-nghon-phoo commented 1 week ago

sure @elnyry-sam-k Zwe will check that.

ZweHMyat commented 51 minutes ago

Hi @elnyry-sam-k Sry for late reply as I was occupied. I have checked the test files and we have both unit and integration tests for that. The unit test is in account_event_handler.test.ts inside fspiop-event-handler-svc and test case name is "should successfully call PartyInfoRequestedEvt". The integration test case name is "should successfully return the party" in account_lookup_evt_handler.test.ts located inside test/integration folder in the project root directory.