[ 
https://issues.apache.org/jira/browse/FINERACT-1921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Santa updated FINERACT-1921:
----------------------------------
    Description: 
h1. Steps to reproduce

Have a batch API request that encapsulates multiple requests, and one of them 
gives a business-exception. E.g.:
 # Have a savings account, with balance 1000
 # Have a batch request with at least 2 requests included. Have 2 withdraws:
 ## Withdraw 1000,
 ## Withdraw 1000
 # Send it in to Fineract.

h1. Expected result
 * The batchAPI request has "200" as http status code
 * in the response body the request-related details contain:
 ** {color:#a31515}"statusCode"{color}{color:#000000}: 
{color}{color:#098658}403{color}
 

 ** {color:#a31515}"body"{color}{color:#000000}: {color}{color:#0451a5}"{\n 
\"developerMessage\": \"Request was understood but caused a domain rule 
violation.\",\n \"httpStatusCode\": \"403\",{color} ....
 

h1. Actual result
 * The batchAPI request has "200" as http status code
 * in the response body the request-related details contain:
 ** {color:#a31515}"statusCode"{color}{color:#000000}: 
{color}{color:#ff0000}+*500*+{color}
 

 ** {color:#a31515}"body"{color}{color:#000000}: {color}{color:#0451a5}"{\n 
\"developerMessage\": \"Request was understood but caused a domain rule 
violation.\",\n \"httpStatusCode\": \"403\",{color} ....
 

 

  was:
h1. Steps to reproduce
 # Have a savings account, with balance 1000
 # Have a batch request with at least 2 requests included. Have 2 withdraws:
 ## Withdraw 1000,
 ## Withdraw 1000
 # Send it in to Fineract.

h1. Expected result
 * The batchAPI request has "200" as http status code
 * in the response body the request-related details contain:
 ** 
{color:#a31515}"statusCode"{color}{color:#000000}: 
{color}{color:#098658}403{color}
 
 ** 
{color:#a31515}"body"{color}{color:#000000}: {color}{color:#0451a5}"{\n 
\"developerMessage\": \"Request was understood but caused a domain rule 
violation.\",\n \"httpStatusCode\": \"403\",{color} ....
 

h1. Actual result
 * The batchAPI request has "200" as http status code
 * in the response body the request-related details contain:
 ** 
{color:#a31515}"statusCode"{color}{color:#000000}: 
{color}{color:#FF0000}+*500*+{color}
 
 ** 
{color:#a31515}"body"{color}{color:#000000}: {color}{color:#0451a5}"{\n 
\"developerMessage\": \"Request was understood but caused a domain rule 
violation.\",\n \"httpStatusCode\": \"403\",{color} ....
 


> BatchAPI - status code mismatch in case of exception
> ----------------------------------------------------
>
>                 Key: FINERACT-1921
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1921
>             Project: Apache Fineract
>          Issue Type: Bug
>            Reporter: Peter Santa
>            Priority: Major
>
> h1. Steps to reproduce
> Have a batch API request that encapsulates multiple requests, and one of them 
> gives a business-exception. E.g.:
>  # Have a savings account, with balance 1000
>  # Have a batch request with at least 2 requests included. Have 2 withdraws:
>  ## Withdraw 1000,
>  ## Withdraw 1000
>  # Send it in to Fineract.
> h1. Expected result
>  * The batchAPI request has "200" as http status code
>  * in the response body the request-related details contain:
>  ** {color:#a31515}"statusCode"{color}{color:#000000}: 
> {color}{color:#098658}403{color}
>  
>  ** {color:#a31515}"body"{color}{color:#000000}: {color}{color:#0451a5}"{\n 
> \"developerMessage\": \"Request was understood but caused a domain rule 
> violation.\",\n \"httpStatusCode\": \"403\",{color} ....
>  
> h1. Actual result
>  * The batchAPI request has "200" as http status code
>  * in the response body the request-related details contain:
>  ** {color:#a31515}"statusCode"{color}{color:#000000}: 
> {color}{color:#ff0000}+*500*+{color}
>  
>  ** {color:#a31515}"body"{color}{color:#000000}: {color}{color:#0451a5}"{\n 
> \"developerMessage\": \"Request was understood but caused a domain rule 
> violation.\",\n \"httpStatusCode\": \"403\",{color} ....
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to