Skip to content

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

Open
mansi75 wants to merge 1 commit intoapache:developfrom
mansi75:fix/FINERACT-2529-client-not-found-exception
Open

FINERACT-2529: pass externalId instead of null resolvedClientId in Cl…#5632
mansi75 wants to merge 1 commit intoapache:developfrom
mansi75:fix/FINERACT-2529-client-not-found-exception

Conversation

@mansi75
Copy link

@mansi75 mansi75 commented Mar 16, 2026

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
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)
  

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.

2 participants