Skip to content

FINERACT-2529: pass externalId instead of null resolvedClientId in Cl… - #5632

Merged
adamsaghy merged 2 commits into
apache:developfrom
mansi75:fix/FINERACT-2529-client-not-found-exception
Mar 26, 2026
Merged

FINERACT-2529: pass externalId instead of null resolvedClientId in Cl…#5632
adamsaghy merged 2 commits into
apache:developfrom
mansi75:fix/FINERACT-2529-client-not-found-exception

Conversation

@mansi75

@mansi75 mansi75 commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Problem

In ClientApiResource.java, the getResolvedClientId method throws a ClientNotFoundException using resolvedClientId variable. However, this block of code only executes when resolvedClientId is null, resulting in an unhelpful error message: "Client with identifier null does not exist."

Fix

Passed the externalId string to the exception instead of resolvedClientId, so the error message accurately reflects which external identifier failed to resolve.

@adamsaghy

Copy link
Copy Markdown
Contributor
  
  Failed scenarios:
  file:///home/runner/work/fineract/fineract/fineract-e2e-tests-runner/src/test/resources/features/BatchApi.feature:25 # Verify Batch API call in case of enclosing transaction is TRUE and one of the steps fails
  
  13 Scenarios (1 failed, 12 passed)
  73 Steps (1 failed, 1 skipped, 71 passed)
  2m24.370s
  
  
  org.opentest4j.AssertionFailedError: [Not the expected error message in error body: Actual error message is: Client with identifier org.apache.fineract.infrastructure.core.domain.ExternalId@f9933d45 does not exist. Expected error message is: Client with identifier null does not exist] 
  expected: "Client with identifier null does not exist"
   but was: "Client with identifier org.apache.fineract.infrastructure.core.domain.ExternalId@f9933d45 does not exist"
  	at org.apache.fineract.test.stepdef.common.BatchApiStepDef.clientNotCreated(BatchApiStepDef.java:932)
  	at ✽.Nr. 1 Client creation was rolled back(file:///home/runner/work/fineract/fineract/fineract-e2e-tests-runner/src/test/resources/features/BatchApi.feature:28)
  

@mansi75

mansi75 commented Mar 18, 2026

Copy link
Copy Markdown
Contributor Author

@adamsaghy I have fixed the above BatchApi failed check. The only check now failing is Fineract PR One Commit Per User Check. I have done the fix for that in the below PR
#5644

@adamsaghy

Copy link
Copy Markdown
Contributor

@mansi75 I a not sure why but for all of your commits it says "unverified"... :/

@mansi75

mansi75 commented Mar 18, 2026

Copy link
Copy Markdown
Contributor Author

@adamsaghy It was showing 'unverified' because I didn't add my GPG key on github. I have added the GPG key. It is verified now. Sorry for the confusion

@adamsaghy

adamsaghy commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

@mansi75 I understand we are moving away from 1 commit per PR, but i still kindly asking you to squash the last 5-6 commits of yours as most of them fixing "trailing space issues", which is simply just "noise".... @meonkeys Thoughts?

@mansi75
mansi75 force-pushed the fix/FINERACT-2529-client-not-found-exception branch from 3e9b174 to eb9542e Compare March 19, 2026 11:01
@mansi75

mansi75 commented Mar 19, 2026

Copy link
Copy Markdown
Contributor Author

@adamsaghy Got your point. I have squashed the last 6 commits. May you please kindly check if it looks fine

@meonkeys

Copy link
Copy Markdown
Contributor

Thanks for doing that, @mansi75.

@adamsaghy agreed, that's sounds like a great case for a contributor to do a local rebase.

The general guidance in FSIP-7 is the best to follow. I'll update CONTRIBUTING.md today, too.

@adamsaghy
adamsaghy merged commit 2fa37ec into apache:develop Mar 26, 2026
43 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants