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

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

Open
ei-nghon-phoo opened this issue Jul 4, 2024 · 9 comments
Assignees
Labels
bug Something isn't working or it has wrong behavior on a Mojaloop Core service vNext vNext Platform Development (inline with RefArch)

Comments

@ei-nghon-phoo
Copy link

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:

  • account lookup bc: 0.6.1
@ei-nghon-phoo ei-nghon-phoo added bug Something isn't working or it has wrong behavior on a Mojaloop Core service vNext vNext Platform Development (inline with RefArch) labels Jul 4, 2024
@elnyry-sam-k
Copy link
Member

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
Copy link
Member

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
Copy link
Author

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
Copy link
Member

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
Copy link

ZweHMyat commented Jul 8, 2024

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

@ei-nghon-phoo
Copy link
Author

ei-nghon-phoo commented Jul 8, 2024

To Test:

  • To add alias<>DFSP association in admin portal first.

  • To call account lookup api without adding destination FSP in request body.

  • expected result: successful api call with to destination FSP in response body.

@elnyry-sam-k
Copy link
Member

@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
Copy link
Author

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

@ZweHMyat
Copy link

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.

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 vNext vNext Platform Development (inline with RefArch)
Projects
None yet
Development

No branches or pull requests

4 participants